Public Group

Archived

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

???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.

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 on other sites
DJGPP is just a port of GCC. Try another port (with an IDE, if you''d like).

Share on other sites
K thanks but what do you mean a port.

Share on other sites
Think ill just try Dev-C++ everyone says its good compiler in these forums.

Share on other sites
Can i actually compile with this.... I actually didnt have to edit autoexec.bat or make some .bat or cfg file

Share on other sites
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 on other sites
What errors? Do you have a build log or something?

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 on other sites
This makes no sense it is declared

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]

• 11
• 20
• 12
• 10
• 34
• Forum Statistics

• Total Topics
631399
• Total Posts
2999854
×