Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    C++ Basics


    Basti
     Share

    Recommended Posts

    Here are some basics in c++ for everyone how wnat o learn it

     

    ********************************************************************************

    *************************************************

    ********************************************************************************

    *************************************************

    ********************************************************************************

    *************************************************

     

    -----------------------------------------------------------------------------

    Jusing Strings in c++

    -----------------------------------------------------------------------------

    /**********************************************
    **			created by Hooligan8x			  **
    **			how to handel strings				**
    **	  with some othere string funktion examples		 **
    ***********************************************/
    
    #include <iostream>
    #include <string>
    #include <stdio.h>
    #include <conio.h>
    
    std::string first_name; //Name of the Author
    std::string last_name;
    std::string full_name;
    std::string part;
    int main(){
    
    first_name ="Hooligan";
    last_name = "8x";
    full_name = first_name + last_name; //Strings can be added together with an +
    std::cout << "The hole name is " << full_name <<'\n';
    
    std::cout <<full_name << " is " << full_name.length() <<" long! \n";
    //-->full_name.length() give the length of the string back<--
    
    part = full_name.substr(3,5);
    //-->.substr(first , last) is cuting out the part between 3 and 5 in that example 
    std::cout << "part of it from 3 too 5 is " << part <<" !!\n";
    
    
    getch();
    return 0;
    }
    
    ********************************************************************************
    *************************************************
    ********************************************************************************
    *************************************************
    ********************************************************************************
    *************************************************
    
    
    
    
    -----------------------------------------------------------------------------
    Jusing Pointers for 2 diferent Memory Types
    Heap = Main memory area 
    stack = Temporary ram 
    -----------------------------------------------------------------------------
    
    /*****************************************************************************
    ******************************************************************************
    **						Created by Hooligan8x							**
    **			How to make Pointers and deltete them again						 **	
    **							on local and heap						   **
    ******************************************************************************
    ******************************************************************************/
    
    
    #include <conio.h>
    #include <stdio.h>
    
    int main() {
    
    int local = 123;			//Local var. is not on the heap where programs put there adresses
    int *plocal = &local;		//Adress for loacl var.  
    							// & <- Adressoperator
    							// * <- Indirection operator
    							//it is local so no need to delet it 
    							//casue the program will delete it by it selfe
    int *pHeap = new int;		//reserve the memory in the heap
    							//-->new reservs the heap memory and returns the adress of it
    *pHeap =12345;				// Gives a value to the heap
    
    printf("------------------------------------\n");
    printf("Resrving and deleating of pointers-!\n");
    printf("------------------------------------\n");
    printf("\n");
    
    printf("Value of local Variable			:%d\n", local);
    printf("Adress of local				:%X\n", plocal);
    printf("Value of the pHep-Pointer		:%d\n", *plocal);
    printf("\n");
    
    printf("Adress of Heap-Pointer			:%X\n", pHeap);
    printf("Value of Heap-Adress			:%d\n", *pHeap);
    printf("Adress of pHeap-Pointer			:%X\n", &pHeap);
    printf("\n");
    
    delete pHeap;				// needed to be done to get the reserverd heap free again. 
    							//if you dont do you will fill p yor rams and thats not good.. 
    							// cause you need to reboot your system othere wise it wold not be 
    							//geting free again
    
    getch();
    return 0;
    }

    If you have any questions contackt me...

    i will post some new things soon

    Link to comment
    Share on other sites

    There are many : Notepad , Dev C++ , Visual Basic , Visual C+ , Visual Basic.net you cna even make them in delphi or VB 2005 or even

    in Phyton or FreeB

    Link to comment
    Share on other sites

    Notepad is complex but fast i suggest googling for this program DEVC++ best free non visual c++ compiler and writer

     

    But all that will be absolute . In 11.08.2007 Microsoft will release WDDC or VB2008

    Link to comment
    Share on other sites

    • 6 months later...

    Try 'Visual Studio 2003 .NET' way easyer to understand

    Link to comment
    Share on other sites

    • 11 months later...
    Try 'Visual Studio 2003 .NET' way easyer to understand

     

    The easiest to understand is Bloodshed Dev-C++.

    Edited by Aspras
    Link to comment
    Share on other sites

    • 2 months later...
    • 2 months later...

    where do i need to enter this code if i open c++?

    and what form do i need to open in c++? anyone pls help me im new with this

    Edited by terrornl12
    Link to comment
    Share on other sites

    • 1 month later...
    • 2 years later...
    • 1 month later...
    • 3 months later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...