virtualadz Posted December 11, 2006 Share Posted December 11, 2006 I have downloaded MS Visual Studio Express, so now what else things do i need to compile, build and execute the c++ program. i.e. do i need a compiler if yes.............can u name one with link to download.Thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted December 11, 2006 Share Posted December 11, 2006 If you downloaded and installed Visual C++ Express then you have a compiler already built in. You just need to write the program and compile with VS. One thing I like about VC++ is that it comes with Win32 and MFC already intregrated. I don't like fooling with libraries and trying to link them. Link to comment Share on other sites More sharing options...
virtualadz Posted December 11, 2006 Author Share Posted December 11, 2006 Thanks for your fast reply !! Link to comment Share on other sites More sharing options...
virtualadz Posted December 11, 2006 Author Share Posted December 11, 2006 Got everything right..........but I can't even compile any c++ files! The build buttons aren't even highlighted on the icon-menu in the GUI, so I have nothing to click. What can I do to build a c++ file in MVS2005? Thanks for your help Link to comment Share on other sites More sharing options...
aspnetguy Posted December 11, 2006 Share Posted December 11, 2006 Do you have Visual Studio 2005 or Visual C++ Express?Can you post a screenshot of VC++ so I can see what you mean...try and show the Solution Explorer too. Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 I have Microsoft Visual C++ 2005 Express Edition. (About Screenshot)screenshot of VC++ with a C++ source file open. (solution explorer on the left side)I cant find the build or compile buttons anywhere Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 As you can see in this screenshot http://msdn.microsoft.com/vstudio/express/...atures/ideview/ you should have a "Project" and "Build" menu bar items which you don't.Did you do the recommended/standard install or did you do a custom install?I recommend uninstalling VC++ and re-downloading it fromt he website again and doing another install just to ensure you didn't get a corrupted download. Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 After some searching i found this"You will need to create a new project and add your C++ file into it. Then you will be able to build the project.Take a look at the last video at http://msdn.microsoft.com/visualc/learning...ds/default.aspx where it contains some step by step procedure."As said......i downloaded the video......and now the build menus can be seen (Screenshot).......the process was to go through File, New, Project from Existing code. but now when i build that file it shows error ...........the program is a simple one........the error is that........fatal error C1083: Cannot open include file: 'iostream.h': No such file or directoryI just dont have any idea where it went wrong.thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 ok I misunderstood I didn't realise you were opening an existing project. It should be <iostream> not <iostream.h> Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 it shows "error C2065: 'cout' : undeclared identifier" Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 Q6: Why do I get error "error C2065: 'cout' : undeclared identifier" even though I have included <iostream>?A6: Standard C++ library is implemented in its own namespace "std". Make sure to add the statement using namespace std; in the beginning of your program or to qualify each Standard C++ library identifier with namespace std, for example, std::cout. So your program should look something like this#include <iostream>using namespace std;int main(){ cout << "Hello World!"; return 0;} Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 It get all well.........but just after successfully building the file.........when i click on Start Without Debuggin....it shows the error (Screenshot)...........do i need to re-install it ( the download i think was without any errors....) .........moreover it takes 3 hrs to download this....i just want to practice c++.....is there any other simple program that u can recommend. Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 not sure what to tell you, I never had any problems. Try an reinstall (not redownload). I am afraid simple and C++ do not go together. I think you will find VC++ is one of the simplest programs for C++, you could also try DevC++ it is pretty good. Most libraries provide a "DevPak" which is an aquto installer of the library for DevC++. Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 Got it !it shows without error.through File> Project from Existing Code > and in the "Specify Project Settings" step.......i clicked on to add support for ATL, MFC, and Common language runtime.and used the project type as "Console Application project"there also other options under project type like "Windows Application Project", Dynamically Linked Library (DLL) project" and "Static Library Project"..............do i need to know which one to use or just continue with Console Application projectone more thing do i need to use this using namespace std; in each and every program?many thanks !!!! Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 Got it !it shows without error.through File> Project from Existing Code > and in the "Specify Project Settings" step.......i clicked on to add support for ATL, MFC, and Common language runtime.and used the project type as "Console Application project"there also other options under project type like "Windows Application Project", Dynamically Linked Library (DLL) project" and "Static Library Project"..............do i need to know which one to use or just continue with Console Application projectone more thing do i need to use this using namespace std; in each and every program?many thanks !!!!A Console Application is a program that runs in DOS (or other OS command line) so if that is what you want/need then use a Console Project. If you want a application with Windows, etc use Windows Application Project, this will use Win32 library.As for using namespace std; I would use it on each program unless you want to do this std::cout, etc for every std command Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 Got it, i just thought of doing a re-install, until the idea of one last attempt hit me. thanks for ur help, else i would have been forever searching the std command Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 No problem and welcome to the torture we call C++ Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 torture, huh , u frightening away a newbie Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 torture, huh , u frightening away a newbie no honestly people get scared of C++ because it is so complex, but its complexity is what makes it so powerful. Just keep at it and it will get easier. After a while you'll forget why you thought it was hard Link to comment Share on other sites More sharing options...
virtualadz Posted December 12, 2006 Author Share Posted December 12, 2006 sure...i wil keep practising it..playing it well and understand each concept level by level. I never knew i did get into this. 2 yrs ago started with web design (and still havent completed the HTML tutorials of this site). but i left web design (i dont know why). When i joined the institute i thought of taking JAVA, and he advised me for a base in C++. though i dont know wat i m going to do with it. Also need to manage schools with that BTW: i like ur site layout, especially the numberings. Link to comment Share on other sites More sharing options...
aspnetguy Posted December 12, 2006 Share Posted December 12, 2006 sure...i wil keep practising it..playing it well and understand each concept level by level. I never knew i did get into this. 2 yrs ago started with web design (and still havent completed the HTML tutorials of this site). but i left web design (i dont know why). When i joined the institute i thought of taking JAVA, and he advised me for a base in C++. though i dont know wat i m going to do with it. Also need to manage schools with that BTW: i like ur site layout, especially the numberings.Thanks, hopefully I can scrap together some time to work on it soon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now