using VS.Net

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • using VS.Net

      I've recently found myself in a position to have a go at using VS.net, admittedly i don't get much time on it. Can anyone tell me how to get to a straightforward code window, i just want to type some of my extremely simple beginners code in and see if it works!
      When i used Borland C at college i had a blue screen with a few menu options, one of which was 'compile'.
      I am sure that VS.net is a fantastically powerful program but how do i just use it for C++ code? Do i have to have a solution, or even a project? can't i just have a program?
      Oh and when i've been through the solution/project/add new item business there seems to be a problem with headers with the error:-

      fatal error C1010: unexpected end of file while looking for precompiled header directive

      I get this even with good old iostream in the most simple 'hello world' program.

      Please help, i will invest if i can see the worth in it.
    • RE: using VS.Net

      What you want is a "console" project. Under VS.NET 2003, here's how you create one.

      On the menu, select Under "File -> New -> Project".

      Under Visual C++ projects, find "Console Application".

      That should do the trick.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • .NET is a development environment - just like the old Visual Studio, of which Visual C++ 6.0 was a part. .NET includes things like C# and ASP.NET to add to C++, Visual Basic, and SQL.

      I've been using it since before it was released - 2001 I guess, and I like it a lot. It certainly crashes less than VC6.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Sorry for hassling you but just in case you're not totally sick of me yet, here goes.

      1) Should i choose console app' or win32 console app'?
      2) Whichever i choose, VC++ (version 7.1) produces source, header and resource files, each of which has more than one entry. The point is, how is it structured, do i need to initialise the headers (ex. iostream) in the header file and then call the functions from within the code in the main file?
      I've tried just writing a standard program with a header at the top for iostream and then a cout command in main but it just errors with cout being an undeclared identifier, whatever that means.

      I just want to work through my beginners book in C++ and i just can't get the code to work, i've considered just running it under Linux but i want to get to grips with VS.net as it's the standard.
      Clearly i'm just beginning with C++ and i don't really know what Win32, MFC or API's are, ( i know the definition from Game Coding but thats all) obviously the book, though extremely interesting, is way beyond me, is there a book which will enlighten me?

      Thanks in the hope that you guys possess endless patience!

      Eric

      p.s. If as a newbie i am on the wrong site for these questions, please point me in the right direction.
    • Bear in mind, I use VS.NET 2002 (version 7.0), so this may or may not work for you, but here's how I usually go about creating a C/C++ console app.

      After starting up VS.NET, I go to File->New->Project. On the left, I make sure got Visual C++ Projects selected, then on the right I select "Win32 Project". I give it a name then hit OK. I get a little dialog box with buttons that say Finish, Cancel, and Help, and two items on the left that say Overview and Application Settings. I click Application Settings, and on the right under Application Type I choose "Console Application", then underneath that in Additional Options, I check "Empty Project". I click Finish and I have a blank project configured for a console application. Afterwards, I go to Project->Add New Item, make sure "C++ File (.cpp)" is selected, give it a name and hit the Open button. That gives me a source file added to the project, and then I can go about including the usual headers, writing a main function and go on writing a usual console application.

      Hope that helps out.