Hi im new to programming, teaching myself, im currently using the V C++ 2008 express edition to learn on, and have found that im getting errors, ive searched the net for my error and still cant get my basic program going, believe im not declaring my variables correctly in the new 2008
My Code
#include <stdafx.h>
#include <iostream>
using namespace std;
Okay,am new either.But let look on this line.
ftemp=(ctemp*1.8)+32;
try to avoid this line and not declare ftemp double,just use cast:
cout<<"ferenheit temp"<<(double)(ctemp*1.8)+32;
.Am typing from mobile that's why my code look like normal text but if u are typing from pc,u should select your code and press this button."<>".
yes. i have VC++ express. seems to like the error is on another cpp file on the project.. try making another console project and copy paste this code..
Odd, when I copy paste the code into my compiler it compiles just fine, and yes I am using Visual Studio 2008. I'm not using express edition; I do not see how that would effect the compiling of your program, as we're using the same tool essentially. Are you still having problems with this?
Still having problems with the same error I was just wondering if any of u can tell me the correct process to open a consol project in vc 2008 enterprise. I normalt just go file new project win32 cobsol application. Is this the correct way to do it
It's better to make a empty project right click on source folder and click add new item, then click the .cpp file give it a name, try some of the above suggestions eg. creating a new empty project and copy pasting the code... Also do you have other cpp files? you talk about print1 and print4. you should really specify what you have done and what doesn't work.
Could you also use code tags in future, there the button on the right that looks like <>
The code definitely works I just tried it in Visual C++ 2010