Thread: visual c++ excpress compiler new user

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    1

    visual c++ excpress compiler new user

    i downloaded this program and can't get it to work
    click on file click on new and write the code and
    it makes a header file temp.h
    and doesn't allow me just to execute the code.
    i feel bad enough
    no need to make jokes about my lack of intellect.
    thanks

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    May be should should check what new you click?
    It seems to me - you create new header file...
    You should try to find a way to create a "new project"
    Select its type (Win32 consol App for example)
    For the start maybe easier to start with "Hello, world!" project, so the wizard creates all files need for compilation...
    When you just replace function body with what you want...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    You need to type your main code into a .c or a .cpp file. (Or some variation, like .cxx.) .h files are ment to be included into .c files -- you can't write a standalone program with just .h files.

    As a sample program, try this.
    Code:
    #include <iostream>
    
    int main(void) {
        std::cout << "Hello, World!" << std::endl;
    
        std::cin.get();
        return 0;
    }
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. visual studio IDE w/ different compiler
    By tooKool4School6 in forum C++ Programming
    Replies: 15
    Last Post: 06-06-2006, 01:41 PM
  2. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  3. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  4. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 03:53 PM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM