• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

simple c++ question

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
This is really confusing. Appearantly I made a cpp file within my prject but when i tell it to debug it says:


"========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped =========="


 
Originally posted by: Goosemaster
I finally got it but I got a compile error🙁

Build Log Build started: Project: Celsius To Fahrenheit, Configuration: Debug|Win32
Command Lines Creating temporary file "c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Celsius To Fahrenheit\Celsius To Fahrenheit\Debug\RSP0000017482664.rsp" with contents
[
/Od /D "_MBCS" /Gm /EHsc /RTC1 /MDd /GS- /Yu"stdafx.h" /Fp"Debug\Celsius To Fahrenheit.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP "..\..\Celsius to Fahrenheit Converter.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Celsius To Fahrenheit\Celsius To Fahrenheit\Debug\RSP0000017482664.rsp" /nologo /errorReport😛rompt"
Output Window Compiling...
Celsius to Fahrenheit Converter.cpp
c:\documents and settings\administrator\my documents\visual studio 2005\projects\celsius to fahrenheit converter.cpp(30) : fatal error C1071: unexpected end of file found in comment
Results Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Celsius To Fahrenheit\Celsius To Fahrenheit\Debug\BuildLog.htm"
Celsius To Fahrenheit - 1 error(s), 0 warning(s)

there's a syntax error some where. can't really tell if I can't see the code
 
Originally posted by: Goosemaster
code

you missed a semicolon after double celsius

and comments are //, not /.

/* needs to be closed with */


another thing, this isn't critical but you should include <iostream>, not <iostream.h> which is no longer standard. just put a "using namespace std;" after your includes
 
I basically fubared the original...I was trying to make it say

"you entered [variable] celsius which is [computed output] degrees fahrenheit"

😱
 
you know what david...next time you have a question shoot me an email so I can help you out on msn or aim...after all I am a CS major.

Regards

ng
 
Originally posted by: dighn
Originally posted by: Goosemaster
whoops I posted teh wrong picture....I fixed it...added the semicolon in their too🙂

comment at the top is still bad

fixed it and now the commands are colored..still not compilign though


I actually tried messing with the code liek I sadi, so what i wrote is nto what is in the excercise ....

I wanted it to write and output with a combination of the input, the output, and text
 
Originally posted by: ngvepforever2
you know what david...next time you have a question shoot me an email so I can help you out on msn or aim...after all I am a CS major.

Regards

ng

Can I bother you right now and save these people from my wrath of incompetence?😀
 
ahh yes another mistake, in the output line, you spelled fahrenheit with a capital F -> C++ is case sensitive
 
Originally posted by: Goosemaster
Originally posted by: ngvepforever2
you know what david...next time you have a question shoot me an email so I can help you out on msn or aim...after all I am a CS major.

Regards

ng

Can I bother you right now and save these people from my wrath of incompetence?😀

sure ... I'll shoot you a pm with my email
 
Originally posted by: Goosemaster
Originally posted by: EyeMWing
Wowserpants, I've never seen someone F up comments.

Dude...all i have ever used is unix shell scripting...and html


<--was about to comment sing "#"'s

I'm having to sit through CS 101, too. And I can tell you this much: The first piece of "code" we went over was commenting 😛

Also, your style is annoying. INDENT! FOR THE LOVE OF GOD, INDENT.

And your comments should either be positioned next to (in most cases) or above (in the case of "sections") the relevant bits. Not below them. 😕

Programming courses need to focus more on code style, readability and modularity, since 99.9999% of a program's development cycle is spent being updated by someone other than the original dev team.

Oh, and C/C++ is case-sensitive.
 
Originally posted by: EyeMWing
Originally posted by: Goosemaster
Originally posted by: EyeMWing
Wowserpants, I've never seen someone F up comments.

Dude...all i have ever used is unix shell scripting...and html


<--was about to comment sing "#"'s

I'm having to sit through CS 101, too. And I can tell you this much: The first piece of "code" we went over was commenting 😛

Also, your style is annoying. INDENT! FOR THE LOVE OF GOD, INDENT.

And your comments should either be positioned next to (in most cases) or above (in the case of "sections") the relevant bits. Not below them. 😕

Programming courses need to focus more on code style, readability and modularity, since 99.9999% of a program's development cycle is spent being updated by someone other than the original dev team.

one step at a time 🙂
 
Originally posted by: dighn
Originally posted by: EyeMWing
Originally posted by: Goosemaster
Originally posted by: EyeMWing
Wowserpants, I've never seen someone F up comments.

Dude...all i have ever used is unix shell scripting...and html


<--was about to comment sing "#"'s

I'm having to sit through CS 101, too. And I can tell you this much: The first piece of "code" we went over was commenting 😛

Also, your style is annoying. INDENT! FOR THE LOVE OF GOD, INDENT.

And your comments should either be positioned next to (in most cases) or above (in the case of "sections") the relevant bits. Not below them. 😕

Programming courses need to focus more on code style, readability and modularity, since 99.9999% of a program's development cycle is spent being updated by someone other than the original dev team.

one step at a time 🙂

These are things you have to beat into a programmer's head when they're still baby programmers. If it looks like crap the first time they do it, it will largely stay that way.
 
Back
Top