| View previous topic :: View next topic |
| Author |
Message |
Chidori Grandmaster Cheater
Reputation: 1
Joined: 25 Apr 2008 Posts: 691 Location: Canada
|
Posted: Wed Sep 03, 2008 6:56 pm Post subject: i just started c++,can anyone help me with this error |
|
|
yah i dont think its anything worng with the script,please don't get mad i just started
| Description: |
|
| Filesize: |
77.8 KB |
| Viewed: |
6204 Time(s) |

|
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Sep 03, 2008 6:58 pm Post subject: |
|
|
| Try Build -> Rebuild solution, then try running it.
|
|
| Back to top |
|
 |
Chidori Grandmaster Cheater
Reputation: 1
Joined: 25 Apr 2008 Posts: 691 Location: Canada
|
Posted: Wed Sep 03, 2008 7:00 pm Post subject: |
|
|
| slovach wrote: | | Try Build -> Rebuild solution, then try running it. | uh where do i go to run it?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Sep 03, 2008 7:04 pm Post subject: |
|
|
| Hit control-f5
|
|
| Back to top |
|
 |
Chidori Grandmaster Cheater
Reputation: 1
Joined: 25 Apr 2008 Posts: 691 Location: Canada
|
Posted: Wed Sep 03, 2008 7:07 pm Post subject: |
|
|
| slovach wrote: | | Hit control-f5 | same error T_T
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Sep 03, 2008 7:17 pm Post subject: |
|
|
| chidori257 wrote: | | slovach wrote: | | Hit control-f5 | same error T_T |
This error occurs once in a while to me. Delete the "Debug" or "Release" folder containing the exe. Then rebuild it.
_________________
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Wed Sep 03, 2008 9:40 pm Post subject: |
|
|
error just means the file doesn't exist you gotta compile it.
Build -> Build All -> Clean
then
Build -> Build All -> Build
_________________
|
|
| Back to top |
|
 |
Chidori Grandmaster Cheater
Reputation: 1
Joined: 25 Apr 2008 Posts: 691 Location: Canada
|
Posted: Thu Sep 04, 2008 3:02 pm Post subject: |
|
|
| pkedpker wrote: | error just means the file doesn't exist you gotta compile it.
Build -> Build All -> Clean
then
Build -> Build All -> Build | um ma use a diffrent compiler what do u recommend?
EDIT: i am now using devc++,this must be a simple error how can i fix this
| Description: |
|
| Filesize: |
121.94 KB |
| Viewed: |
6108 Time(s) |

|
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Sep 04, 2008 3:44 pm Post subject: |
|
|
| chidori257 wrote: | | pkedpker wrote: | error just means the file doesn't exist you gotta compile it.
Build -> Build All -> Clean
then
Build -> Build All -> Build | um ma use a diffrent compiler what do u recommend?
EDIT: i am now using devc++,this must be a simple error how can i fix this |
It's because it's forcing goodness. Change it to int main and return a value.
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Thu Sep 04, 2008 4:30 pm Post subject: |
|
|
And before you ask why your program closes as soon as you open it, put
| Code: | cin.sync();
cin.ignore(); |
before the return 0;.
_________________
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Sep 04, 2008 5:17 pm Post subject: |
|
|
| HalfPrime wrote: | And before you ask why your program closes as soon as you open it, put
| Code: | cin.sync();
cin.ignore(); |
before the return 0;. |
Donn't make assumptions, please.
If you even looked at the pic, the tut he is using if off of youtube, so the code must work.
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Sep 04, 2008 7:30 pm Post subject: |
|
|
| kitterz wrote: | | HalfPrime wrote: | And before you ask why your program closes as soon as you open it, put
| Code: | cin.sync();
cin.ignore(); |
before the return 0;. |
Donn't make assumptions, please.
If you even looked at the pic, the tut he is using if off of youtube, so the code must work.  |
Yeah, because it's on youtube, it just has to work flawlessly.
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Thu Sep 04, 2008 9:07 pm Post subject: |
|
|
If you looked at the code in the picture, you'd see he only has cout statements.
_________________
|
|
| Back to top |
|
 |
TehBlue Newbie cheater
Reputation: 0
Joined: 14 Jul 2008 Posts: 10
|
Posted: Fri Sep 05, 2008 3:43 pm Post subject: |
|
|
| chidori257 wrote: | | pkedpker wrote: | error just means the file doesn't exist you gotta compile it.
Build -> Build All -> Clean
then
Build -> Build All -> Build | um ma use a diffrent compiler what do u recommend?
EDIT: i am now using devc++,this must be a simple error how can i fix this |
try this
#include <iostream>
using namespace std;
int main(){
// code here
}
use int instead of void
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Fri Sep 05, 2008 3:53 pm Post subject: |
|
|
| TehBlue wrote: | | chidori257 wrote: | | pkedpker wrote: | error just means the file doesn't exist you gotta compile it.
Build -> Build All -> Clean
then
Build -> Build All -> Build | um ma use a diffrent compiler what do u recommend?
EDIT: i am now using devc++,this must be a simple error how can i fix this |
try this
#include <iostream>
using namespace std;
int main(){
// code here
}
use int instead of void |
yes use a int main() {}
also int in front means its a function so it must return something at the end before the }.
so its
int main() {
//code here
return 0;
}
_________________
|
|
| Back to top |
|
 |
|