A "strcpy" Question

Non-platform specific questions.

A "strcpy" Question

Postby Toasterman » Sun Jul 25, 2010 10:21 pm

Changing text using the built in funtion (the one that opens a whole new window) is a pain in the rear, so I use strcpy.
I was wondering if it was possible to have text over multiple lines via strcpy- can you use the "enter" key, basically.
Just pressing "enter" in your quotes doesn't work (or atleast it didn't when I tried- maybe I messed something else).

Is it even possible, and if so, how?
thanks in advance

by the way, is this question more suited to the "general" forum? (sorry if I posted in the wrong place)
"If there are no stupid questions, what kind of questions do stupid people ask? Do they get smart just in time to ask a question? -Scott Adams

Hey! I've got okayish internet now! Now I can try all those cool demos I've seen!
User avatar
Toasterman
 
Posts: 75
Joined: Thu Jul 22, 2010 4:22 am
Location: Drowning in Dial-Up Ocean
Score: 7 Give a positive score

Re: A "strcpy" Question

Postby DilloDude » Sun Jul 25, 2010 10:59 pm

You can use the esacpe sequence "\n" for a new line:
Code: Select all
strcpy(text, "Hello, bob!\nHow's it going?");
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: A "strcpy" Question

Postby Toasterman » Sun Jul 25, 2010 11:23 pm

Thank You! :D
your_points+=1;
"If there are no stupid questions, what kind of questions do stupid people ask? Do they get smart just in time to ask a question? -Scott Adams

Hey! I've got okayish internet now! Now I can try all those cool demos I've seen!
User avatar
Toasterman
 
Posts: 75
Joined: Thu Jul 22, 2010 4:22 am
Location: Drowning in Dial-Up Ocean
Score: 7 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron