Jul 12, 2013 at 1:50pm UTC
@LB Isn't contributing to the post somewhat ironic?
Jul 12, 2013 at 2:59pm UTC
A Group Of Eight wrote:1 2
if (forumname == 'amhndu' )
amhndu.leave();
Since you like to be a 'D', your code doesn't even make sense. If you want a string in C++, then you need quotation marks.
if (forumname == "amhndu" )
Also, where did you define amhndu's object?
Last edited on Jul 12, 2013 at 3:00pm UTC by Fredbill30
Jul 12, 2013 at 6:13pm UTC
fred... we arent writing c++ code. in python thats perfectly acceptable
Jul 12, 2013 at 6:36pm UTC
cout in python? There's a << operator too?
Jul 12, 2013 at 7:25pm UTC
I believe he meant in python you can use ' ' and " " for string literals.
Last edited on Jul 12, 2013 at 7:25pm UTC
Jul 12, 2013 at 7:32pm UTC
yes i meant just the literal part. we are writing in our own language at this point i believe
Jul 12, 2013 at 7:50pm UTC
while ((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))));
Jul 12, 2013 at 7:58pm UTC
iHutch105 wrote:@LB Isn't contributing to the post somewhat ironic?
hahaha
1 2 3 4 5 6
int geek = 0;
while (!geek)
{
cout<<"i will you to become a geek *" <<geek<<endl;
}
Last edited on Jul 12, 2013 at 8:00pm UTC
Jul 12, 2013 at 10:45pm UTC
LB doesn't nag,
Last edited on Jul 12, 2013 at 10:49pm UTC
Jul 13, 2013 at 1:38am UTC
You mean "L B", right devon? :3
Jul 13, 2013 at 3:40am UTC
assert(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!true );
Last edited on Jul 13, 2013 at 3:41am UTC
Jul 13, 2013 at 6:26am UTC
1 2
string this_thread = new string;
this_thread = "awesome" ;
Last edited on Jul 13, 2013 at 7:20am UTC
Jul 13, 2013 at 10:53am UTC
@DTSCode, Fredbill30
A string is allowed to span across multiple lines only if you end each line with a backslash ('\'). Also, any strings that are adjacent are automatically concatenated:
1 2 3 4 5 6 7 8 9 10 11
// Bad
const char * string = "hello
world" ;
// Good
const char * string = "hello \
world" ;
// Better.
const char * string = "hello "
"world" ;
Last edited on Jul 13, 2013 at 10:53am UTC
Jul 13, 2013 at 11:15am UTC
In Python, you can have a string span multiple lines by using triple quotation marks (""").