Computing.Net > Forums > Programming > need help C++ dev sorta easy

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

need help C++ dev sorta easy

Reply to Message Icon

Name: Justin
Date: April 2, 2003 at 07:25:15 Pacific
OS: -
CPU/Ram: --
Comment:

http://www.geocities.com/cplushelp2003/techie.html

i posed it there cuz theres text cuts off greater than less than... I keep getting ONE error in compile...


appreciate any help,
jb



Sponsored Link
Ads by Google

Response Number 1
Name: borelli34
Date: April 2, 2003 at 08:35:36 Pacific
Reply:

I think this line

void getTEMP(int & );

should be

void getTEMP(int);

right?

borelli34


0

Response Number 2
Name: JB
Date: April 2, 2003 at 08:52:26 Pacific
Reply:

There were 2 lines containing that and I tried altering both, and each one way or another and that didn't work... (i mean with the reference, with or without)...


??

thanks tho for responderin =]
if you can compile it and work, on DEV C++ 4 do tell how :)!!


0

Response Number 3
Name: egkenny
Date: April 2, 2003 at 10:56:07 Pacific
Reply:

There were a couple of syntax errors:
#include <iostream.h>
#include <stdlib.h>

void getTEMP(int & );
void printACTIVITY( int );

int main()
{
    int temperature;
    getTEMP(temperature);
    printACTIVITY(temperature);
    system("PAUSE");
    return 0;
}

void getTEMP(int & temp)
{
    cout << "Enter the temperature: ";
    cin >> temp;
    cout << "The current temperature is " << temp << endl;
}

void printACTIVITY(int temp)
{
    cout << "The recommended activity is " ;
    if (temp > 85)
        cout << "swimming." << endl;
    else if (temp > 70)
        cout << "tennis" << endl;
    else if (temp > 32)
        cout << "golf" << endl;
    else if (temp > 0)
        cout << "skiing" << endl;
    else
        cout << "dancing" <<endl;
}


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: need help C++ dev sorta easy

Need help with C programming www.computing.net/answers/programming/need-help-with-c-programming/6970.html

C#Need help ;date selection formula www.computing.net/answers/programming/cneed-help-date-selection-formula/7589.html

Need help with C++? www.computing.net/answers/programming/need-help-with-c/4642.html