Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
Beginning C++ - Introduction
  • Xin
    Posts: 3,251
    [---------------------------------------------------]
    Beginning C++ - Introduction
    Written By Xinapse
    For iExploit.org

    [b]Difficulty:Easy

    [---------------------------------------------------][/b]

    ----------[Introduction
    C++ is an object oriented, low level programming language, it is compatible with its predecessor C, C++ can generate very fast, efficient programs, often being used to write games, graphics software, hardware drivers, and other applications where the speed and performance are essential. C++ is a portable language and can be used all major operating systems. Some OS's have specific extensions such as Visual C++ and Visual C++.net from Microsoft.

    ----------[Choosing your IDE

    Before we start any coding we are going to need an ide, to build the programs and make them work. Depending on your Operating system the choice of compiler will be different.

    ----------[GCC / G++]
    If you are using Linux, you can use
    http://gcc.gnu.org/ (gcc) or g++ or c++

    This comes with many distros so you do not have to install.
    I will list some of the frequently used operations used,
    To Compile myprog.C so that myprog contains symbolic information that enables it to be debugged with the gdb debugger type:
    g++ -g myprog.C -o myprog

    To Have the compiler generate many warnings about syntactically correct but questionable looking code. It is good practice to always use this option with gcc and g++ type:
    g++ -Wall myprog.C -o myprog

    To Generate symbolic information for gdb and many warning messages type:
    g++ -g -Wall myprog.C -o myprog 

    To Generate optimized code on a Solaris machine with warnings type:
    g++ -Wall -O -mv8 myprog.C -o myprog

    To Generate optimized code on a Solaris machine using Sun's own CC compiler producing a faster code type:
    CC -fast myprog.C -o myprog

    To Generate optimized code on a Linux machine type:
    g++ -O myprog.C -o myprog

    To Compile myprog.C when it contains Xlib graphics routines type:
    g++ myprog.C -o myprog -lX11


    This should give you a good understanding of using the command line g++ on unix systems to compile your programs.

    -----------[Windows
    If you are using windows i suggest getting Codeblocks at
    http://www.codeblocks.org/

    It runs a nice graphical user interface making it easy for you to compile code.
    If you are looking for an alternative download Bloodshed dev c++
    http://www.bloodshed.net/devcpp.html

    Both are very simillar programs and get the job done, to compile there is a simple menu button with options, compile, compile and run etc.

    Stay tuned for the next lesson where we will create your first program.
    ]------------------------------------------
    Xin
  • Bursihido
    Posts: 406
    THank you :)


    tooshort........................................
  • Xin
    Posts: 3,251
    No problem im glad you liked it:)
    Xin
  • chroniccommand
    Posts: 1,389
    Nice I see you made it like my paper layouts =P
  • Xin
    Posts: 3,251
    Yeah they were nicer and it works on the blog as well :)
    Xin
  • chroniccommand
    Posts: 1,389
    said:


    Yeah they were nicer and it works on the blog as well :)


    =P I would think this should belong in the Programming section.
  • Xin
    Posts: 3,251
    Yeap i will move it there once the C/C++ section is up, also once i have those sections up can you help move the posts into relevant sections from the programming section, you should be able to do that with your privellages, if not i may need to assign you the right forum
    Xin