Post: Good News 4 Me
01-22-2011, 06:59 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hey Guys Well Guess What im Taking Computer/Programing Classes And This From Now On will Be Were i Post My Every Code i Learn in My Classes So 2day We Were Learning How 2 Do a Pop Up Box So
This is Wat i Wrote Down & Remembered
Also i Think i Have Some Tut's On Wat THE Things Mean
srry bout Sloppy Code im Tired

if (fError) { if (MessageBox(hwndDlg, SZNOTFOUND, SZDELETEITEM, MB_OKCANCEL)==IDOK) { // Prompt for a new item name and repeat the command. } else { // Cancel the command. } } In this example, SZNOTFOUND and SZDELETEITEM are application-defined, null-terminated strings that represent the message text and the title for the message box. // A simple message box, with only the OK button. AfxMessageBox(_T("Simple message box.")); // A message box that uses a string from a string table // with yes and no buttons and the stop icon. // NOTE: nStringID is an integer that contains a valid id of // a string in the current resource. AfxMessageBox(nStringID, MB_YESNO|MB_ICONSTOP);

---------- Post added at 01:50 AM ---------- Previous post was at 01:45 AM ----------

#include <afxwin.h>
struct CFrameTest : public CFrameWnd{ CFrameTest() { Create(NULL, "Windows Application Tester", WS_POPUPWINDOW | WS_CAPTION, CRect(400, 280, 580, 520), NULL, NULL, WS_EX_TOOLWINDOW); }};struct CAppTest : public CWinApp{ BOOL InitInstance() { CFrameTest *Tester = new CFrameTest(); m_pMainWnd = Tester; Tester->ShowWindow(SW_NORMAL); return TRUE; }};CAppTest theApp;

Srry Bout Sloppy Code im Tired
+ im using My Ps3 + My ipod My Labtop is being Used.

---------- Post added at 01:59 AM ---------- Previous post was at 01:50 AM ----------

Well 1 Day I Kept Showing My Pop's So Off Cod EliteMossy's Code Than He Fliped Out Saying i Better Find a Different Carrer & Stuff So 1 Day i Bought 3
Books
Books Were : C++ Full Edition 4 Dummies
Programing Book
Game Programing Book
Also i Had Expierence B4 So i Was Fimilar With The Coding
So This Was My 1st Program

#include <iostream>
using namespace std;int main (){ cout << "By_A_GOD_Modder ";
cout << "I'm a Beast ProgramerLOL"; return 0;}
01-22-2011, 07:27 AM #2
HacksReleaser
Pokemon Trainer
More of my coding
Omg I just create my 1st game lol not really I'm done programing I'm a expert lol not really but here's me and my buddy freaker's code

It's called my high and low
/* HIGH/LOW GAME
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
/*
This program plays a simple game.The computer picks a random number
from
0 to 100, and the user tries to guess the number.
*/
const int totchan=7;
void main()
{
int number; //the computer's random number
int guess; //the user's guess
int chances=0,score=0,chanscor; //chanscor stores score for 1
successful chance.
char ans;
do
{ clrscr();
chances=score=0;
cout<<"
Welcome to the High/Low game.";
cout<<"
I will pick a random number from 0 to 100.";
cout<<"
You must try to guess the number.
";
randomize();
number=(int)(rand()%100);
chanscor=100/totchan; //score for each successful chance
do
{
cout<<"
What is your guess? (0 to 100) ";
cin>>guess;
if((guess<0)||(guess>100))
{
cout<<"Sorry, but your guess "<<guess<<"must be from 0 to 100.";
}
else if(guess < number)
{
cout<<guess<<" is low.Try a higher number.";
}
else if(guess > number)
{
cout<<guess<<" is high.Try a lower number.";
}
else //if correct number is guessed
{ //number is correct, and the "do" loop will end below
cout<<guess<<" is correct. Congratulations!";
score=chanscor*(totchan-chances); //score calculated for number of
chances left
cout<<"
Your score is "<<score<<endl;
break;
}
chances++;
if(guess!=number)
cout<<"

Now you have "<<totchan-chances<<"chances left."<<endl;
if(chances==totchan)
{ cout<<"

Only "<<totchan<<"chances are allowed.Better luck next
time";
cout<<"
The actual number was "<<number<<endl;
break;
}
}while (guess!=number);
cout<<"

Thank you for playing High/Low Created by ThatFamousfellathathacks & freak";
cout<<"Want to play it again u fukingloser lol? (y/n)...";
cin>>ans;
}while(ans=='y' || ans=='Y'Winky Winky;
}

---------- Post added at 02:27 AM ---------- Previous post was at 02:24 AM ----------

Yea ok now it's right in place im bam on my laptop |Smile
01-22-2011, 07:40 PM #3
Use a line and use php tags so it looks neat.
01-23-2011, 03:13 AM #4
Yea i Guess Shit i 4got 2 Go 2 My Next Lesson Dam

Dam


  • Things i 4Got 2 Do
  • Take My Programin Class


    Dam i Think im Bad LOL
  • 01-23-2011, 05:30 AM #5
    Ok im Good Now i Just Read Mad Fuking Of My Programing Book Chapters
    Its Getting Tuff No LOL ATM Im Learnin About Classes And How They Work
    C++ Is Cool & Programing is Cool

    Cool Man (aka Tustin)

  • Is Nextgenupdate Great?
  • 1.) Yes it's ****ing Great i Love Posting Shit On it When im Tired As Fuk Lol
  • 2.) Yes its OK Gtfo NGU IS Beast
  • 3.) I'm Lovin it.
         cout << "Hello I Hack & NGU IS THE LALA LAND 4 Hacker. " ?? endl;
    
  • 02-07-2011, 07:35 PM #6
    Originally posted by SALOOTME View Post
    Hey Guys Well Guess What im Taking Computer/Programing Classes And This From Now On will Be Were i Post My Every Code i Learn in My Classes So 2day We Were Learning How 2 Do a Pop Up Box So
    This is Wat i Wrote Down & Remembered
    Also i Think i Have Some Tut's On Wat THE Things Mean
    srry bout Sloppy Code im Tired

    if (fError) { if (MessageBox(hwndDlg, SZNOTFOUND, SZDELETEITEM, MB_OKCANCEL)==IDOK) { // Prompt for a new item name and repeat the command. } else { // Cancel the command. } } In this example, SZNOTFOUND and SZDELETEITEM are application-defined, null-terminated strings that represent the message text and the title for the message box. // A simple message box, with only the OK button. AfxMessageBox(_T("Simple message box.")); // A message box that uses a string from a string table // with yes and no buttons and the stop icon. // NOTE: nStringID is an integer that contains a valid id of // a string in the current resource. AfxMessageBox(nStringID, MB_YESNO|MB_ICONSTOP);

    ---------- Post added at 01:50 AM ---------- Previous post was at 01:45 AM ----------

    #include <afxwin.h>
    struct CFrameTest : public CFrameWnd{ CFrameTest() { Create(NULL, "Windows Application Tester", WS_POPUPWINDOW | WS_CAPTION, CRect(400, 280, 580, 520), NULL, NULL, WS_EX_TOOLWINDOW); }};struct CAppTest : public CWinApp{ BOOL InitInstance() { CFrameTest *Tester = new CFrameTest(); m_pMainWnd = Tester; Tester->ShowWindow(SW_NORMAL); return TRUE; }};CAppTest theApp;

    Srry Bout Sloppy Code im Tired
    + im using My Ps3 + My ipod My Labtop is being Used.

    ---------- Post added at 01:59 AM ---------- Previous post was at 01:50 AM ----------

    Well 1 Day I Kept Showing My Pop's So Off Cod EliteMossy's Code Than He Fliped Out Saying i Better Find a Different Carrer & Stuff So 1 Day i Bought 3
    Books
    Books Were : C++ Full Edition 4 Dummies
    Programing Book
    Game Programing Book
    Also i Had Expierence B4 So i Was Fimilar With The Coding
    So This Was My 1st Program

    #include <iostream>
    using namespace std;int main (){ cout << "By_A_GOD_Modder ";
    cout << "I'm a Beast ProgramerLOL"; return 0;}


    Originally posted by HacksReleaser View Post
    More of my coding
    Omg I just create my 1st game lol not really I'm done programing I'm a expert lol not really but here's me and my buddy freaker's code

    It's called my high and low
    /* HIGH/LOW GAME
    #include<iostream.h>
    #include<conio.h>
    #include<stdlib.h>
    /*
    This program plays a simple game.The computer picks a random number
    from
    0 to 100, and the user tries to guess the number.
    */
    const int totchan=7;
    void main()
    {
    int number; //the computer's random number
    int guess; //the user's guess
    int chances=0,score=0,chanscor; //chanscor stores score for 1
    successful chance.
    char ans;
    do
    { clrscr();
    chances=score=0;
    cout<<"
    Welcome to the High/Low game.";
    cout<<"
    I will pick a random number from 0 to 100.";
    cout<<"
    You must try to guess the number.
    ";
    randomize();
    number=(int)(rand()%100);
    chanscor=100/totchan; //score for each successful chance
    do
    {
    cout<<"
    What is your guess? (0 to 100) ";
    cin>>guess;
    if((guess<0)||(guess>100))
    {
    cout<<"Sorry, but your guess "<<guess<<"must be from 0 to 100.";
    }
    else if(guess < number)
    {
    cout<<guess<<" is low.Try a higher number.";
    }
    else if(guess > number)
    {
    cout<<guess<<" is high.Try a lower number.";
    }
    else //if correct number is guessed
    { //number is correct, and the "do" loop will end below
    cout<<guess<<" is correct. Congratulations!";
    score=chanscor*(totchan-chances); //score calculated for number of
    chances left
    cout<<"
    Your score is "<<score<<endl;
    break;
    }
    chances++;
    if(guess!=number)
    cout<<"

    Now you have "<<totchan-chances<<"chances left."<<endl;
    if(chances==totchan)
    { cout<<"

    Only "<<totchan<<"chances are allowed.Better luck next
    time";
    cout<<"
    The actual number was "<<number<<endl;
    break;
    }
    }while (guess!=number);
    cout<<"

    Thank you for playing High/Low Created by ThatFamousfellathathacks & freak";
    cout<<"Want to play it again u fukingloser lol? (y/n)...";
    cin>>ans;
    }while(ans=='y' || ans=='Y'Winky Winky;
    }

    ---------- Post added at 02:27 AM ---------- Previous post was at 02:24 AM ----------

    Yea ok now it's right in place im bam on my laptop |Smile


    Originally posted by StuxNet View Post
    Use a line and use php tags so it looks neat.


    Originally posted by SALOOTME View Post
    Yea i Guess Shit i 4got 2 Go 2 My Next Lesson Dam

    Dam


  • Things i 4Got 2 Do
  • Take My Programin Class


    Dam i Think im Bad LOL


  • Originally posted by SALOOTME View Post
    Ok im Good Now i Just Read Mad Fuking Of My Programing Book Chapters
    Its Getting Tuff No LOL ATM Im Learnin About Classes And How They Work
    C++ Is Cool & Programing is Cool

    Cool Man (aka Tustin)

  • Is Nextgenupdate Great?
  • 1.) Yes it's ****ing Great i Love Posting Shit On it When im Tired As Fuk Lol
  • 2.) Yes its OK Gtfo NGU IS Beast
  • 3.) I'm Lovin it.
         cout << "Hello I Hack & NGU IS THE LALA LAND 4 Hacker. " ?? endl;
    



  • Learn to use
         [/ php ]

    [php]
    //drawMenu.h

    #include<iostream>
    #include<windows.h>
    #include<string>
    #include <stdio.h>
    #include<conio.h>
    using namespace std;

    void ShowConsoleCursor( BOOL bShow )
    {

    static HANDLE hOut;
    static BOOL firstTime = TRUE;
    CONSOLE_CURSOR_INFO cursorInfo;

    if( firstTime )
    {

    hOut = GetStdHandle( STD_OUTPUT_HANDLE );
    firstTime = FALSE;

    }

    cursorInfo.dwSize = 10;
    cursorInfo.bVisible = bShow;

    SetConsoleCursorInfo( hOut,
    &cursorInfo );

    }

    void gotoxy( short x, short y ) {

    HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD position = { x, y };

    SetConsoleCursorPosition( hStdout, position );
    }


    bool matchMenu(int a,int b)
    {
    if((a-97)==b)
    return true;
    else
    return false;
    }

    void menuUp(char& a,int arraySize)
    {
    if((a-97)==0)
    {
    a+=(arraySize-1);
    }
    else
    {
    a-=1;
    }
    return;
    }

    void menuDown(char& a,int arraySize)
    {
    if((a-97)==(arraySize-1))
    {
    a-=(arraySize-1);
    }
    else
    {
    a+=1;
    }
    return;
    }

    int drawMenu(string message,string menuNameParse,int tabs)
    {
    ShowConsoleCursor(0);
    CONSOLE_SCREEN_BUFFER_INFO SBInfo;
    HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
    int menuAmmount=0,catchArrow,whichArrow,keyInput;
    string menuNamesAfterParse,tabsQuantity;

    for(int a=0;a<tabs;a++)
    {
    tabsQuantity+="\t";
    }

    menuNamesAfterParse=menuNameParse;

    for(;Winky Winky
    {
    menuAmmount+=1;
    if(menuNameParse.find_first_of('|'Winky Winky>=30)
    break;
    menuNameParse = menuNameParse.substr(0, menuNameParse.find_last_of('|'Winky Winky);
    }


    string menuNames[menuAmmount];

    for(int i=0;i<menuAmmount;i++)
    {
    menuNames[i]=menuNamesAfterParse.substr(0, menuNamesAfterParse.find_first_of('|'Winky Winky );
    if(i!=(menuAmmount-1))
    {
    menuNamesAfterParse = menuNamesAfterParse.substr(menuNamesAfterParse.find_first_of('|'Winky Winky);
    menuNamesAfterParse = menuNamesAfterParse.substr(1);
    }
    }

    char menuOn='a';

    cout<<tabsQuantity<<"<"<<message<<">\n
    ";

    for(;Winky Winky
    {
    GetConsoleScreenBufferInfo(hOut, &SBInfo);
    for(int i=0;i<menuAmmount;i++)
    {
    cout<<tabsQuantity;
    if(matchMenu(menuOn,i))
    {
    SetConsoleTextAttribute(hOut,BACKGROUND_GREEN|BACKGROUND_RED|BACKGROUND_INTENSITY|NULL);
    cout<<menuNames[i]<<endl;
    SetConsoleTextAttribute(hOut, FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED|NULL);
    }
    else
    {
    cout<<menuNames[i]<<endl;
    }
    }
    gotoxy(0,0);

    catchArrow=getch();
    gotoxy(SBInfo.dwCursorPosition.X,SBInfo.dwCursorPosition.Y);
    if (catchArrow==224)
    {
    whichArrow=getch();
    switch(whichArrow)
    {
    case 72: keyInput=1;
    break;
    case 80: keyInput=2;
    break;
    case 75: keyInput=3;
    break;
    case 77: keyInput=4;
    break;
    }
    }
    else if(catchArrow==13)
    {
    keyInput=5;
    }
    else
    {
    keyInput=0;
    }

    if(keyInput==1)
    {
    menuUp(menuOn,menuAmmount);
    }
    if(keyInput==2)
    {
    menuDown(menuOn,menuAmmount);
    }
    if(keyInput==5)
    {
    system("cls");
    ShowConsoleCursor(1);
    return(int(menuOn-96));
    }
    }
    }

    //TheUberFail
    03-01-2011, 09:05 PM #7
    x-MaGiiKZz-o
    Who’s Jim Erased?
    I hate getting taught languages at school but when it comes to C++ and scripting languages, I'm tuned in Winky Winky
    And cool, good luck with them codes

    Copyright © 2024, NextGenUpdate.
    All Rights Reserved.

    Gray NextGenUpdate Logo