Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: C++ Practical Functions Help  (Read 3343 times)

0 Members and 1 Guest are viewing this topic.

progmer

    Topic Starter


    Rookie

    C++ Practical Functions Help
    « on: December 07, 2015, 08:23:13 AM »
    Hi there,

    I've been learning C++ for awhile now and is mostly done in Windows OS. ( MinGW, no IDE just using Notepad, prefer raw stuff... :D )

    From my book and some online sources, most of the functions that I can access is basically just the Hard drive ( read / write file ), RAM ( assigning variables ) and CPU ( doing arithmetics and logic ).
    Everything seems fine at first, but soon I realized something is missing. From my book, every program I wrote always run in the Command Prompt.
    But a practical program should have Graphical Interface, control Audio and receive input from Keyboard and Mouse and such.

    I learned that in order to have those functions, I need to install extra components ( libraries ) in C++ such as SDL, OpenGL and stuff like that. ( which is not mentioned at all in my book... except <iostream> and other basic stuff )

    So, I would really appreciate someone to explain a bit about these "components".
    How and where can you find these thing and what does it actually do to the original C++?

    If possible, please provide some guides for me...
    I'm trying to create a basic "Tone Generator". A simple program where you can "draw an audio wave form" and the program will "play that wave form from the speaker". It seems easy at first, but couldn't find any libraries that does that...


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C++ Practical Functions Help
    « Reply #1 on: December 07, 2015, 10:59:48 AM »
    I don't think SDL (Simple DirectMedia Layer) and OpenGL would necessarily meet the needs of a typical User Interface program, but it would be useful for Audio functions. You would probably want to either install the Windows SDK (I have no idea how well it would work with minGW) or use a UI Toolkit such as GTK or QT.

    Quote
    So, I would really appreciate someone to explain a bit about these "components".
    How and where can you find these thing and what does it actually do to the original C++?
    You can usually arrive at the appropriate project pages for them with a proper search. Typically you will want the SDK. They work effectively the same as any other header file, you use an #include and the functions and constants defined therein are available to you.
    I was trying to dereference Null Pointers before it was cool.