Thread: C++ Question Regarding Windows

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    2

    C++ Question Regarding Windows

    Hello,

    I'm extremely new to C++ Programming, well to programming in general. I am an advanced website designer and I have expierence in PHP, Flash, mySQL, etc. However I know nothing about C. One thing I am wondering, and this may be a stupid question, but say I create a program... does this become a windows based program? Can I share it with others and it will work fine for them? Will it be like any other windows program I guess is what I am asking... with an icon and all the jive? Thanks for your help, it's extremely appreicated.

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Compiler? If you create a Win32 Console app or just a Win32
    app it will run fine in Windows.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I'm extremely new to C++ Programming, well to programming in general
    Well, you really can't start-out writing a windows GUI program. There's a lot of overhead involved. A text-based (console) C++ program that displays "Hello World" is about 5 lines of code. The same windows program is about 50 lines! There are some simple example windows programs at www.cplusplus.com .

    Start with the console-type tutorials here, and get a beginning book. I recommend "Teach Yourself C++ In 21 Days". When you're ready for windows,"Programming Windows" by Charles Petzold is excellent.
    I am an advanced website designer and I have expierence in PHP, Flash, mySQL, etc.
    Great! you can probably actually work through the "21 Days" book in 21 days! C++ is not the easiest language... I'd say at least twice as hard as basic... But, I think you can handle it.
    does this become a windows based program?
    You have to include the special windows functions and structures from the windows.h library. These are part of the Windows API. I think somewhere I read that there are about 1000 different WinAPI functions. (Nobody knows them all.)

    If you have a windows compiler (Like Microsoft Visual C++) there is an option for creating a console application. These run in a DOS-like window, and will not automaticaly interact with the mouse, etc. The exe file is a 32 bit application and will NOT run in true DOS.


    Can I share it with others and it will work fine for them?
    Sure! The exe file will run on any windows computer if there are no bugs and it's compiled for the right version of windows. (There are WinAPI calls that work in XP, but aren't part of Win98.)
    Last edited by DougDbug; 02-20-2003 at 07:07 PM.

  4. #4
    Registered User
    Join Date
    Feb 2003
    Posts
    2
    Thanks guys that helps me a lot. And thanks for the book recommendations... I'll try to pick them up.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An Elementary Windows Question
    By samGwilliam in forum Windows Programming
    Replies: 7
    Last Post: 01-20-2006, 04:20 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Two Windows on two different HDD??? Question
    By Sevrin in forum Tech Board
    Replies: 6
    Last Post: 06-19-2003, 10:22 AM
  4. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  5. Another windows service question... starting/stopping
    By BrianK in forum Windows Programming
    Replies: 1
    Last Post: 03-20-2003, 12:22 AM