Thread: What is the future of console programming ?

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    29

    What is the future of console programming ?

    Hi !!,
    First of all i would apologise if anyone finds my question to be frustrating or may be even childish. I would like to know if mere console programming should be sufficient if i want to be a good C and C++ programmer ? I had joined classes for learning C and C++ on a UNIX (linux actually) platform. To get a better idea of how the code works my faculty told me that i should program on DOS with TC++ as a compiler as there is no F7 like utility available for UNIX platform that would let me see the flow of a program. I asked this qeustion to many a friends who are into programming but the answers could not make things clear. Could anyone please tell me would it be enough to learn console programming ?

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    What compiler and operating system do you have? Ofcourse console has a future. It is the best way to learn the definition of C and C++. Also, if people are telling you to use DOS, than they are misinformed.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    29

    Thank you for such a fast reply !!

    Hi!!,
    This place really answers the questions so fast !!
    I was working on Linux 6.1 with GCC as compiler and on windows it is Turbo C++. Could you please elaborate as to what according to you could learning console programming help me ? Is there any demand for Console programmers still ? Thank you again for such a quick reply

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,539
    > as there is no F7 like utility available for UNIX platform that would let me see the flow of a program.
    Assuming F7 starts the source level debugger, then this is simply incorrect advice.

    The GNU toolset features a debugger called gdb, which will allow you to watch the code executing, amonst other things.

    Besides, the DOS/TC++ combination is more than a little out of date now.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    On your Microsoft Windows system you should use a compiler called Visual C++6. Many introductory versions are available at little costs. Usually the cost of a textbook. This is the Windows industry standard compiler. As far as Linux goes, I can not comment. I do not know that environment.

    They type of project workspace that you learn to program in with VC++6 is called a 'Win32 Console'. It has nothing to do with DOS or the DOS Virtual Machine that you will find on a professional Windows operating system.

    Is there work for console programmers? Yes and no. The answer is that the console is where you learn to program. As soon as you learn to program you will use an interface called an API which will allow you to access hardware such as video. Do not concern yourself with this now. There is only one way to learn how to program. You begin in the console. I would abandon TC as soon as possible because that is not a good compiler. Feel free to ask more questions. We can eventually get you on the right path.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    29

    Thanks alot !!

    Hi !!,
    Trust me, nobody made things so clearer to me in such a precise manner. I sincerely thank you for the help. I would also be asking a lot of questions here now that its clear that this is the only place where i get correct answers and-more important-
    guidance that i am looking for.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    BTW, DOS is not completely dead. Windows console programming is much better for most respects, but many DOS features are not available in the Win32 console. Some tasks are simplified in DOS programming, some simplified under Windows.

  8. #8
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    If you have a really old operating system than DOS is indeed different than Win32. If you have a professional operating system such as WinNT or Win2k or WinXP, than DOS is a DOS Virtual Machine, and infact it is Win32 simulated to run some DOS programs. Ultimately though it is nothing more than Win32.

  9. #9
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    I had joined classes for learning C and C++ on a UNIX (linux actually) platform. To get a better idea of how the code works my faculty told me that i should program on DOS with TC++ as a compiler as there is no F7 like utility available for UNIX platform that would let me see the flow of a program.
    Well you can use gdb to do this. I've used gdb
    so much that I've actually had gdb crash on a program.

    First compile your program into some thing like p1 with -g
    gcc -o p1 p1.c -g -Wall

    Then type
    gdb ./p1
    To set a break point it is possible to say
    break <function> or
    break <filename>:<line#> or
    break <label>
    break <memory address>

    stepi and nexti are for assembly instructions

    step executes each c/c++ statement one by one and goes
    into function calls.

    If you type enter after a command it executes it
    another type so you can do repeative steps.

    run starts normal execution of the program.
    continue starts the program after a break point.
    list shows a view of source code near by.

    next executes each c/c++ statement one by one and does
    not go into function calls.

    back does a stack trace of functions called. The stack can get screwed up, so this can give bad results.

    You can use the print and x commands to view data.
    So like to see the first byte of an array you could something
    like
    x /b a1
    given that a1 is in gdb's symbol table.

    make can be used inside gdb.
    You can also use shell <command>

    You can use watch points which you can use like
    watch <variable name>
    watch <memory location>

    Could anyone please tell me would it be enough to learn console programming ?
    Console programming is programming where the file
    being written to is tied to the screen.
    Just about all programmers have to learn file access.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console, Terminal and Terminal Emulator
    By lehe in forum C Programming
    Replies: 4
    Last Post: 02-15-2009, 09:59 PM
  2. Full Screen Console
    By St0rmTroop3er in forum C++ Programming
    Replies: 1
    Last Post: 09-26-2005, 09:59 PM
  3. Problems with a simple console game
    By DZeek in forum C++ Programming
    Replies: 9
    Last Post: 03-06-2005, 02:02 PM
  4. Console Functions Help
    By Artist_of_dream in forum C++ Programming
    Replies: 9
    Last Post: 12-04-2004, 03:44 AM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM