Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 01-16-05   #1 (permalink)
Overclocked N00bLaR
 
Mr.N00bLaR's Avatar
 
amd nvidia

Join Date: Dec 2004
Posts: 4,832

FAQs Submitted: 4
Hardware Reviews: 1
Trader Rating: 0
Default Need me up C++ help!!!

Trying to create a randum generator but somethings wronmg and i dunno what it is...
I keep getting a
c:\program files\microsoft visual studio\myprojects\crapbot\crapbot.cpp(31) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.



error but if you look at my screen shot....there is no line 31 ***?? Errors on non existing lines? i dont understand(btw still a uber noob to c++) I even tried pressing enter and having it as a blank line or moving the // end to line 31 and someother places i just cant figure it out..please help, REPNESS!!
__________________
It's so COLD outside! stay inside -- www.OverClock.net -- You can join Here
Gotta question? Refer to the extensive Frequently Asked Questions section! Check out Overclock.net's Folding At Home stats and join!

You think your commodore 64 is really neato - what kinda chip you got in there? A dorito?
Your usin' a 286? Don't make me laugh, windows loads up in what? A day in a half? - Yankovic
"Aumotocnic"An unfortunate member of the overclock.net insomnia club"
Quote:
Originally Posted by Butterbum View Post
This is overclock.net. We overclock every single pc we come across. Nobody is safe.

THE CHEVY Owners CLUB!

System: My System
CPU
AMD XP 2800+
Motherboard
ASUS Kamet
Memory
1x2 Kingston Value
Graphics Card
nv420
Hard Drive
120gig
Sound Card
Onboard
Power Supply
Thermaltake 550
Case
COMPAQ
CPU cooling
TT Volcano
OS
Ubuntu 7.10
Monitor
MV520,AOC,Dell
Mr.N00bLaR is offline Overclocked Account   Reply With Quote
Old 01-16-05   #2 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 490 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 264
FAQs Submitted: 10
Hardware Reviews: 11
Trader Rating: 3
Default

Quote:
Originally Posted by Mr.N00bLaR
Trying to create a randum generator but somethings wronmg and i dunno what it is...
I keep getting a
c:\program files\microsoft visual studio\myprojects\crapbot\crapbot.cpp(31) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.



error but if you look at my screen shot....there is no line 31 ***?? Errors on non existing lines? i dont understand(btw still a uber noob to c++) I even tried pressing enter and having it as a blank line or moving the // end to line 31 and someother places i just cant figure it out..please help, REPNESS!!
The screenshot did not post, but I would go ahead and run a wipe of line 31, even if it has no content something is flagging the error, as might as well try to get rid of it.
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline Overclocked Account   Reply With Quote
Old 01-16-05   #3 (permalink)
Overclocked N00bLaR
 
Mr.N00bLaR's Avatar
 
amd nvidia

Join Date: Dec 2004
Posts: 4,832

FAQs Submitted: 4
Hardware Reviews: 1
Trader Rating: 0
Default

hmm what do you mean by wipe of line 31??????
Theres nothing on it? hmm i tried to upload a bmp of it it liek froze ill try something else after this poset but jpg quality blows
__________________
It's so COLD outside! stay inside -- www.OverClock.net -- You can join Here
Gotta question? Refer to the extensive Frequently Asked Questions section! Check out Overclock.net's Folding At Home stats and join!

You think your commodore 64 is really neato - what kinda chip you got in there? A dorito?
Your usin' a 286? Don't make me laugh, windows loads up in what? A day in a half? - Yankovic
"Aumotocnic"An unfortunate member of the overclock.net insomnia club"
Quote:
Originally Posted by Butterbum View Post
This is overclock.net. We overclock every single pc we come across. Nobody is safe.

THE CHEVY Owners CLUB!

System: My System
CPU
AMD XP 2800+
Motherboard
ASUS Kamet
Memory
1x2 Kingston Value
Graphics Card
nv420
Hard Drive
120gig
Sound Card
Onboard
Power Supply
Thermaltake 550
Case
COMPAQ
CPU cooling
TT Volcano
OS
Ubuntu 7.10
Monitor
MV520,AOC,Dell

Last edited by Mr.N00bLaR : 01-16-05 at 02:27 AM.
Mr.N00bLaR is offline Overclocked Account   Reply With Quote
Old 01-16-05   #4 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 490 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 264
FAQs Submitted: 10
Hardware Reviews: 11
Trader Rating: 3
Default

Quote:
Originally Posted by Mr.N00bLaR
hmm what do you mean by wipe of line 31??????
Theres nothing on it? hmm i tried to upload a bmp of it it liek froze ill try something else after this poset but jpg quality blows
Delete the entire line and try to compile it again.
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline Overclocked Account   Reply With Quote
Old 01-16-05   #5 (permalink)
Overclocked N00bLaR
 
Mr.N00bLaR's Avatar
 
amd nvidia

Join Date: Dec 2004
Posts: 4,832

FAQs Submitted: 4
Hardware Reviews: 1
Trader Rating: 0
Default

I dunno i retyped the second half of the code lol it still says the same erro with the line after the }
__________________
It's so COLD outside! stay inside -- www.OverClock.net -- You can join Here
Gotta question? Refer to the extensive Frequently Asked Questions section! Check out Overclock.net's Folding At Home stats and join!

You think your commodore 64 is really neato - what kinda chip you got in there? A dorito?
Your usin' a 286? Don't make me laugh, windows loads up in what? A day in a half? - Yankovic
"Aumotocnic"An unfortunate member of the overclock.net insomnia club"
Quote:
Originally Posted by Butterbum View Post
This is overclock.net. We overclock every single pc we come across. Nobody is safe.

THE CHEVY Owners CLUB!

System: My System
CPU
AMD XP 2800+
Motherboard
ASUS Kamet
Memory
1x2 Kingston Value
Graphics Card
nv420
Hard Drive
120gig
Sound Card
Onboard
Power Supply
Thermaltake 550
Case
COMPAQ
CPU cooling
TT Volcano
OS
Ubuntu 7.10
Monitor
MV520,AOC,Dell
Mr.N00bLaR is offline Overclocked Account   Reply With Quote
Old 01-16-05   #6 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 490 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 264
FAQs Submitted: 10
Hardware Reviews: 11
Trader Rating: 3
Default

Quote:
Originally Posted by Mr.N00bLaR
I dunno i retyped the second half of the code lol it still says the same erro with the line after the }
Try moving it to wordpad to see if there are any hidden characters, then paste it right back into the compiler.

Utherwise I don't have a clue how it could be giving the message if there is nothing there.
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline Overclocked Account   Reply With Quote
Old 01-16-05   #7 (permalink)
Overclocked N00bLaR
 
Mr.N00bLaR's Avatar
 
amd nvidia

Join Date: Dec 2004
Posts: 4,832

FAQs Submitted: 4
Hardware Reviews: 1
Trader Rating: 0
Default

Hmm i just tried that it, i dont see anything...Lol i must be doing something wrong because i cant compile a single programs with out getting that error...
I dunno C++ to much for my pea brain lol

Btw it made that as a


Windows 32 Application

and i tried it as a

Windows 32 Console Application


I'm not sure weather or not that means anything im just tryin to make it in liek a cmd window
__________________
It's so COLD outside! stay inside -- www.OverClock.net -- You can join Here
Gotta question? Refer to the extensive Frequently Asked Questions section! Check out Overclock.net's Folding At Home stats and join!

You think your commodore 64 is really neato - what kinda chip you got in there? A dorito?
Your usin' a 286? Don't make me laugh, windows loads up in what? A day in a half? - Yankovic
"Aumotocnic"An unfortunate member of the overclock.net insomnia club"
Quote:
Originally Posted by Butterbum View Post
This is overclock.net. We overclock every single pc we come across. Nobody is safe.

THE CHEVY Owners CLUB!

System: My System
CPU
AMD XP 2800+
Motherboard
ASUS Kamet
Memory
1x2 Kingston Value
Graphics Card
nv420
Hard Drive
120gig
Sound Card
Onboard
Power Supply
Thermaltake 550
Case
COMPAQ
CPU cooling
TT Volcano
OS
Ubuntu 7.10
Monitor
MV520,AOC,Dell
Mr.N00bLaR is offline Overclocked Account   Reply With Quote
Old 01-16-05   #8 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 490 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 264
FAQs Submitted: 10
Hardware Reviews: 11
Trader Rating: 3
Default

Quote:
Originally Posted by Mr.N00bLaR
Hmm i just tried that it, i dont see anything...Lol i must be doing something wrong because i cant compile a single programs with out getting that error...
I dunno C++ to much for my pea brain lol

Btw it made that as a


Windows 32 Application

and i tried it as a

Windows 32 Console Application


I'm not sure weather or not that means anything im just tryin to make it in liek a cmd window
console just means it does not run in a cmd window, neither of those options should make any difference to your error, it actually think you may want to try to uninstall and reinstall the compiler and see if there is jsut a bad file in the compiler library.
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline Overclocked Account   Reply With Quote
Old 01-16-05   #9 (permalink)
Overclocked N00bLaR
 
Mr.N00bLaR's Avatar
 
amd nvidia

Join Date: Dec 2004
Posts: 4,832

FAQs Submitted: 4
Hardware Reviews: 1
Trader Rating: 0
Default

Hmm...i tried that...still same bs...
Can you spot anything wrong with my code?

// CrapBot1.cpp : Defines the entry point for the application.
// Shifted, scaled integers produced by 1 + rand() % 6.
#include <iostream>

using std::cout;
using std::endl;

#include <iomanip>

using std::setw;

#include <cstdlib> // contains function prototype for rand

int main()
{
// loop 20 times
for ( int counter = 1; counter <= 20; counter++ ) {

// pick random number from 1 to 6 and output it
cout << setw( 10 ) << ( 1 + rand() % 6 );

// if counter divisible by 5, begin new line of output
if ( counter % 5 == 0 )
cout << endl;

} // end for structure

return 0; // indicate successful termination

} // end funtion main
__________________
It's so COLD outside! stay inside -- www.OverClock.net -- You can join Here
Gotta question? Refer to the extensive Frequently Asked Questions section! Check out Overclock.net's Folding At Home stats and join!

You think your commodore 64 is really neato - what kinda chip you got in there? A dorito?
Your usin' a 286? Don't make me laugh, windows loads up in what? A day in a half? - Yankovic
"Aumotocnic"An unfortunate member of the overclock.net insomnia club"
Quote:
Originally Posted by Butterbum View Post
This is overclock.net. We overclock every single pc we come across. Nobody is safe.

THE CHEVY Owners CLUB!

System: My System
CPU
AMD XP 2800+
Motherboard
ASUS Kamet
Memory
1x2 Kingston Value
Graphics Card
nv420
Hard Drive
120gig
Sound Card
Onboard
Power Supply
Thermaltake 550
Case
COMPAQ
CPU cooling
TT Volcano
OS
Ubuntu 7.10
Monitor
MV520,AOC,Dell
Mr.N00bLaR is offline Overclocked Account   Reply With Quote
Old 01-16-05   #10 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 490 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 264
FAQs Submitted: 10
Hardware Reviews: 11
Trader Rating: 3
Default

It looks like clean code but I havn't used C++ in like 7 years so I may be missing something, lets see if anyone else can find a problem.
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline Overclocked Account   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 04:27 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.29192 seconds with 9 queries