When I try to make a command prompt program in Dev-cpp the command end1; doesn't work! Does anyone know why?
or another command to make it start another line?
Dev-cpp compiler
Dev-cpp compiler
Jonas
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
i believe it goes like this:
after you write stuff in "cout << "Hello!";", insert \n where you want a newline, example:
will turn out like this:
after you write stuff in "cout << "Hello!";", insert \n where you want a newline, example:
Code: Select all
cout << "Hello!\nHi again!";
Code: Select all
Hello!
Hi again!
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
That would be nice! For some reason end1 or endI don't work even though the tutorial that came with dev-cpp said to use it!:? but I found out that the "\n" function works the best.
Jonas
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
it is neither end1 nor endI, it is endl - that last character is a small L - and means endline I don't have the devcpp compiler right here but I'm pretty sure it works
btw "\n" means "newline" and it is not a function but an escape sequence
http://www.cprogramming.com/
btw "\n" means "newline" and it is not a function but an escape sequence
http://www.cprogramming.com/