November 24th, 2004, 06:08 PM
|
#1 (permalink)
| | Member
Join Date: Nov 2004
Posts: 118
|
#include <iostream>
using namespace std;
int main()
{
cout << "-----text here------.\n";
system("pause");
cout << "----text is in here---.";
cout << "------text here----------------------.";
cout << "---------same here again obviously------ "
system("pause"); // <-------- error here
return 0;
}
hey look at that code and tell me whats wrong with it please? thanks for all who help and my compiler proggy thingy is Dev-Cpp 4.9.9.0
(i wrote a similar program to this b4 but i didnt get an issue on that line where i put a comment)
Last edited by NodX5 : November 24th, 2004 at 06:14 PM.
|
| |
November 24th, 2004, 06:22 PM
|
#2 (permalink)
| | Ultimate Member
Join Date: Jul 2003 Location: West Valley City, Ut
Posts: 1,202
|
you forgot a ; after the last cout. It just gives you the error on the next line after where the ; should be.
Last edited by Ryanoffski : November 24th, 2004 at 06:34 PM.
|
| |
November 24th, 2004, 06:23 PM
|
#3 (permalink)
| | Ultimate Member
Join Date: Jul 2003 Location: West Valley City, Ut
Posts: 1,202
| Code: #include <iostream>
using namespace std;
int main()
{
cout << "-----text here------.\n";
system("pause");
cout << "----text is in here---.";
cout << "------text here----------------------.";
cout << "---------same here again obviously------ ";
system("pause"); // <-------- error here
return 0;
} Here it is fixed. |
| |
November 24th, 2004, 11:18 PM
|
#4 (permalink)
| | Member
Join Date: Nov 2004
Posts: 118
|
omg.... i feel like a retard now.... |
| |
November 24th, 2004, 11:47 PM
|
#5 (permalink)
| | Ultimate Member
Join Date: Jul 2003 Location: West Valley City, Ut
Posts: 1,202
|
No, it's always a good idea to have someone with fresh eyes look at the code. I swear, if I were writing that, I would probably have done the exact same thing. |
| |
November 25th, 2004, 12:33 AM
|
#6 (permalink)
| | Space for Sale! :p
Join Date: Oct 2001 Location: La Isla del Encanto
Posts: 5,832
|
That happens a lot!
And when the codes start getting complicated and you start to use a lot of if and fors and switch cases, etc you will have to look out not only cor colons but for these little guys! { } 
__________________
boo!
|
| |
November 25th, 2004, 12:48 AM
|
#7 (permalink)
| | Member
Join Date: Nov 2004
Posts: 118
|
ha thanks for the encouragement :P ill remember to look out for stuff like the semi colons... hope that doesnt happen again... sorry if i wasted ur time... but im moving onto the arithmetic stuff im on my way there!
again thnx for the help if i didnt mention it |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | RAID-1 | neila | Storage Related | 21 | July 31st, 2004 06:40 PM | | dll.error | miriam | Technical Support | 5 | June 26th, 2004 11:45 PM | | iMac not booting | Jonty | Technical Support | 2 | June 9th, 2003 05:51 PM | | VBox Error! (what the heck) | ComputerNerd8888 | Technical Support | 3 | May 23rd, 2003 04:26 PM | | Site not working | EagleID | General Discussion and Buyer Guidance | 2 | March 13th, 2002 05:56 PM | | Most Active Discussions | | | | | Recent Discussions  | | | | | |