I need urgent help. I don't know how to use Visual Basic...

Hi guys, I just started a new class in college and this professor uses a different compiler than my previous professor.

I used to use Dev-C++
but now I'm supposed to use Microsoft Visual Studio 2010 IDE for C++.
I think I downloaded the right one "Microsoft Visual C++ 2010 Express"
I don't know how to start typing my program becauseI don't know what project I'm supposed to create.
Do I create an "Empty Project"? Because I clicked something I think win32 application console thing and it showed this:


// PA01.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}


:\. No Idea what I'm doing. I don't know what stdafx.h or anything means :x.... Help. ;o ty
When you click "new console application" ti creates console application project prepared for Win32 API (Windows programing interface).

if u wanna code it in plain ANSI C++ create empty C++ project then add additional new files.

or you can just delete files created from Win32 console project.
Is Visual Basic C++ can I code the same way I did in Dev-C++?
or what? :I .
Yes of course you can :D

visual basic is IDE just like any other except that it's project templates are based on Win32 API that's why you've seen this ugly code.

just create emply project and start writing C++ as you did before.
so the only way to write favorite C++ is empty project, forget about other project types!
I did D: .
But it keeps saying it can't find the file (when I start debugging)
I tried a simple code just to test if it worked
1
2
3
4
5
6
7
8
9
10
11

#include <iostream>
#include <iomanip>

using namespace std;
int main()
{
cout<<"hi"<<endl;
system("Pause");
return 0;
}


Then it says cannot find the file or something ):
it can't find the file? what file exactly, what is the name of that file? do you get some output, can you paste the output here?
Okay.
Let me start over step by step. :o
. New project > Empty project.. It gives me nothing. I then click new file > cpp file > now Ifinally get a blank screen to type in so I just copy and pasted the code above and push f5 to debug > and I get this error, "Unable to start program 'c:\users...etcetc The system cannot find the file specified"

There is no output at all unless that error code counts.


Last edited on
this is fkn* strange man, it may be due to corupted installation.

the error say's it can't include eather <iostream> or <iomanip> I suppose.
try removing one of them and see if that work.

BTW include files are located in:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include

try this if you do not want to reinstall:
right click on project>properties>C/C++>general>additionall include directories>edit>
then fill in that path above.

see if that helps.
I'm trying to reinstall first .
sigh. this is making my life so complicated >:(
Are you adding your main.cpp to your source files folder?
I have no idea what main.cpp is ?
and I reinstalled with no luck. I get the same error as above... ;-;...
fml.

How am I supposed to do my work when this thing doesn't even like me ): .
I watched the tutorial and did exactly as they did.
I made my own header thing #include <etc stuff
and then added that to my cpp file.

...

-____-
main is *.cpp file where your main function resides.

I've uploaded an image,
take a look where sources must be and where headers must be:
http://api.ning.com/files/37vvPLzrvC6nuNEKJg7TpdwZk8Znj7fbusFzvT8FgbQBJTuuub3pHdOH*iqEdYmr0Loyf2JFUEHnCQDt90N0dzfywIeW8CmL/Capture.PNG
You are quite the beginner in computer science world eh? It's alright we were all there at one point. Anyways, I just wanna point out that visual basic is not your IDE, VB is one of many variations of the BASIC language. Visual studio (or visual c++) is your IDE.
lol I didn't see that title says Visual basic. O_O
@residentBiscuit
yeah that's what I meant , I didn't think there was a difference (Because Idk what the names are... or what they mean for that matter)


I am a beginner ;-;. And I don't think I'm going to be getting any better but I'm testing out Intro to Comp sci II to see if I should stay in this field or not :\
Lets start bit by bit. It should be very easy start with implement coding.
__________________

http://www.livewatchmovies.com/
Topic archived. No new replies allowed.