Southperry.net
Problems using Microsoft Visual C++ - Printable Version

+- Southperry.net (https://www.southperry.net)
+-- Forum: Maplers Helping Maplers (https://www.southperry.net/forumdisplay.php?fid=9)
+--- Forum: Technical Help (https://www.southperry.net/forumdisplay.php?fid=84)
+--- Thread: Problems using Microsoft Visual C++ (/showthread.php?tid=50232)



Problems using Microsoft Visual C++ - Haseo - 2012-01-01

I honestly have no idea what's going wrong anymore.

I tried compiling using a number of different solution types, but I keep getting the following error:
[Image: why1.png]
[Image: why2.png]

I have already tried the filetypes as circled in red.
[Image: why.png]

What is going on? Why is this happening? I tried renaming my .cpp file to .exe to try to solve the problem, but it didn't work. What am I doing wrong?


Problems using Microsoft Visual C++ - Spaz - 2012-01-01

Why are there no files in your project other than readme.txt? Your .cpp file does not appear to be in your project.


Problems using Microsoft Visual C++ - Haseo - 2012-01-01

How do I do that? I tried saving it within the debug folder, the project folder, etc. It still doesn't work.


Problems using Microsoft Visual C++ - Spaz - 2012-01-01

How are you creating the .cpp file? Are you creating it in notepad or something and then trying to use Visual C++ to compile?

To add a .cpp file to the project, right-click the Source Files folder and choose Add New Item.


Problems using Microsoft Visual C++ - Fiel - 2012-01-02

You do realize that won't compile right?

Code:
int x = "I quit";

I don't know how that makes sense. A string is not an integer.


Problems using Microsoft Visual C++ - Haseo - 2012-01-02

So... what should I have used instead?


Problems using Microsoft Visual C++ - Fiel - 2012-01-02

http://www.cplusplus.com/reference/string/string/


Problems using Microsoft Visual C++ - nRxUs - 2012-01-02

Besides the problem Fiel specified, also you need to include all your .cpp files in your project.
To do this do the following:
1. Go to File.
2. Move "something.cpp" into...
3. Choose your project.
Try to compile then.
EDIT: I always use Empty Project unless I am working with Graphics in which case I use Windows Applications with settings on Empty Project.