Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problems of a Total Beginner while using "Ecclipse"(Not able to mix literals with variables)
icon6.gif  Problems of a Total Beginner while using "Ecclipse" [message #1724069] Sat, 20 February 2016 15:33 Go to next message
Von Braunn is currently offline Von BraunnFriend
Messages: 2
Registered: February 2016
Junior Member
index.php/fa/25051/0/




#include <iostream>
#include <string>
using namespace std;
int main() {
string a = "Hello there!";
cout<< "Charecter - 1 : Hello world "<< endl << "Charecter - 2" << a << ;

return 0;
}



What is wrong with the code in line 6 ?? !! Im not able to mix the literals with the string? Why does this happen? Any response is appreciated !
Re: Problems of a Total Beginner while using &quot;Ecclipse&quot; [message #1724151 is a reply to message #1724069] Sun, 21 February 2016 21:00 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 02/21/2016 01:47 AM, Von Braunn wrote:
> #include <iostream>
> #include <string>
> using namespace std;
> int main() {
> string a = "Hello there!";
> cout<< "Charecter - 1 : Hello world "<< endl << "Charecter - 2" << a << ;
>
> return 0;
> }
>
>
>
> What is wrong with the code in line 6 ?? !! Im not able to mix the literals with the string? Why does this happen? Any response is appreciated !

For C/C++ questions, you'll get more and better help by posting in the
Eclipse CDT forum (as noted in a sticky post at this forum's top).
Previous Topic:Save/deploy to different directory than project?
Next Topic:how to attach picture?
Goto Forum:
  


Current Time: Thu Apr 25 09:23:10 GMT 2024

Powered by FUDForum. Page generated in 0.08647 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top