Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ApparitionX

???DJGPP with XP???

This topic is 5575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an xp comp and djgpp doesnt work for me. I have everything working great till I click make and it tells me that just about everything is undeclared when it debugs. What does that mean? Ive checked the program a few times and im pretty sure it is correct now. Ive gotten it out of a book called weekened crash course which I think is a good beggining book but not my last book of course for C++. Have any of you had this problem... and if so how do I fix it? Should I just find another similar compiler. Which ones out there are similar to djgpp? I like djgpp because it reminds me of qbasic which was pretty simple.

Share this post


Link to post
Share on other sites
Advertisement
still have the undeclared error in Dev-C++ plus one othe error.

Here is the programming code whats wrong with it?
//
// Conversion - convert temperature from Celsius
// degree units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <stdio.h>
#include <iostream.h>
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celsius
int nCelsius;
cout << "Enter the temperature in Celsius:";
cin >> nCelsius;

// calculate conversion factor for Celsius
// to Fahrenheit
int nFactor;
nFactor = 212 - 32;

// use conversion factor to convert Celsius
// into Fahrenheit values
int nFahrenheit;
nFahrenheit = nFactor * nCelsius/100 + 32;

// output the results
cout << "Fahrenheit value is:";
cout << nFahrenheit;

return 0;
}

Share this post


Link to post
Share on other sites
um i just started learning about programming and what i do is i compile it and it says

C:\wecc\programs\Conversion.cpp
[Warning] In function `int main(int, char**)':

10 C:\wecc\programs\Conversion.cpp
`cout' undeclared (first use this function)

10 C:\wecc\programs\Conversion.cpp
(Each undeclared identifier is reported

11 C:\wecc\programs\Conversion.cpp
`cin' undeclared (first use this function)

16 C:\wecc\programs\Conversion.cpp
`nfactor' undeclared (first use this

21 C:\wecc\programs\Conversion.cpp
`nFactor' undeclared (first use this

Im guessing that I didnt have a problem with djgpp after all because this basicly the same errors

[edited by - ApparitionX on March 18, 2003 2:52:45 PM]

Share this post


Link to post
Share on other sites
I figured it out int has to go after cout and cin!!!!!!!!!!!!! yes!!!! This is so confuseing that only got rid of one error. this makes no sense there shouldnt have even been a problem there....


[edited by - ApparitionX on March 18, 2003 3:00:31 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!