no compile tool is associated

This is a discussion on no compile tool is associated within the C++ Programming forums, part of the General Programming Boards category; yes im a newbie, and didnt even get started good and already shot down. ok imlearning off of the web ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    98

    no compile tool is associated

    yes im a newbie, and didnt even get started good and already shot down. ok imlearning off of the web with the usual hello world stuff. when i complie the script it gives me an error message saying,Cannot compile file c:\windows\desktop\text1melearning; no compile tool is associated with the file extension. the code is

    #include
    <iostream.h>

    void main()
    {
    cout<<"Hello World"<<endl;
    }


    another thing is, how should i start this programming, i am using microsoft vc++, under file in the start, i put text file,under projects,what do i put?iv been using win 32 console application.

    thanks

  2. #2
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    Make sure that your code is in a file with the extension .cpp or .c for C-style. It seems like you've written your code in a Text file that may have an extension .h or .txt, you need to change this to .cpp.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    98

    no compile tool is associated

    thanks onestiffrod, that helped a little

    i found out that when i open a new project,( in this particular instance) that if i put under files,c++ header files, and under projects,win32 console application, it opens as a h header file and compiles and runs ok in dos. is this the way that most projects should be opened? and would like to know of a link defining the ways to open differant projects, and what they mean, ie c++ header file,c++ source files,win32 console application and so on and so forth in the files and projects tabs in vc++
    thanks

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    98

    no compile tool is associated

    and another thing. how would i change a txt to a .cpp file?have tried variouse ways and notthing seems to work

    thanks

  5. #5
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    To change the file extension, all you need to do is rename it with the name you want and the extension .cpp. If your using XP the file extensions are hidden from you but you can open the file you want in notepad and Save As... use the drop down box and specify *all files* and not TEXT(.txt), then type in your file name with the extension .cpp, now it is changed.

    Your second question about projects and files is a little confusing but here goes...
    _____FILES________
    C++ Source File - is what you want, especially when you're doing beginner projects. This is the .cpp file.

    Header File - this is a .h file that is used to hold declarations for classes and functions and even variables. Beginners do not need to bother with this type of file, it's main use is for classes. You will be #include-ing .h files that are already made in your programs but that is the extent you'll be using them for now.

    _________PROJECTS_________
    MFC app - is the basic windows program, this will let you have all of the drop down menus, use the mouse and so on.

    Win32 console - is a console app with windows support, it makes little difference whether you use this or a plain console since beginner projects will not use the win32 capabilities.

    Console - a console is the basic Black screen(DOS) with flashing cursor which is what most of your beginner projects use.

    The other stuff I haven't mentioned is not relevant to you at this time, as you progress your knowledge it will make more sense to you the type of projects you can create with VC++.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  6. #6
    Registered User
    Join Date
    Feb 2002
    Posts
    98

    no compile tool is associated

    onestiffrod, you are the man, oopps, i mean boy lol

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. open scene graph compile issues
    By ichijoji in forum Game Programming
    Replies: 1
    Last Post: 08-04-2005, 12:31 PM
  2. compile program?
    By Goosie in forum C++ Programming
    Replies: 9
    Last Post: 06-22-2005, 02:26 PM
  3. dvv-cpp not able to compile?
    By Rune Hunter in forum C++ Programming
    Replies: 12
    Last Post: 10-23-2004, 06:36 PM
  4. Replies: 3
    Last Post: 03-27-2004, 11:15 AM
  5. compile once, compile twice ...error
    By Benzakhar in forum Windows Programming
    Replies: 6
    Last Post: 12-28-2003, 05:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21