Hi, im super new to this but its slowly making more and more sense. Anyway im following along in a book teaching C++ and it helps you write a simple program. Im using codeblocks on linux if it matters. well it shows me what line the mistakes on but i cant seem to figure out what it is. its probably something right in my face that im too new to figure out.
heres a link with the code. i tried reading through all the build messages but i couldnt make anything of them.
#include <iostream>
usingnamespace std;
int main()
{
// enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
// convert Celsius into Fahrenheit values
int fahrenheit;
fahrenheit = celsius * 9/5 + 32;
// output the results (followed by a NewLine)
cout << "Fahrenheit value is:";
cout << fahrenheit << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
while (true) {};
return 0;
}
I deleted the includes for cstdlib and cstdio. I deleted the arguments in main (I don't know how to use the arguments in main but I thought they were unecessary so I just got rid of them). When you attempting to print out the strings I changed the asterisks to quotes. I got rid of the system pause (I don't know how to use that) and put a while loop. There was also an end1 instead of an endl so I changed that.
The only things that actually needed to be done to make this program run was to fix the end1, change the asterisks to quotes and remove the first line that isn't a comment. The other parts work fine although they aren't necessary. Whenever you want to print out strings you need to use quotes and not asterisks.