What would this do? 
  Jan 10, 2011 at 4:07am UTC  
 
I came across this code could someone tell me what would it do?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 
#include "hudda.h" 
using  namespace  std;
int  main()
{
    cout <<
    "including Vector"  <<
    endl;
    Sleep (1000);
    cout << "\n\n Vector Added"  << endl;
    Sleep (1000);
    cout <<
    "Including Iostream" 
    << endl;
    Sleep (1000);
    cout
    << "\n\n Iostream Added"  << endl;
    Sleep (1000);
    cout <<
    "Including String"  << endl;
    Sleep (1000);
    cout
    << "\n\n String Added"  << endl;
    Sleep (1000);
    cout <<
    "Including Windows"  << endl;
    Sleep (1000);
    cout
    << "\n\n Windows Added"  << endl;
    Sleep (1000);
    cout
    << "Including ctime & cmath"  << endl;
    Sleep (1000);
    cout
    << "\n\n ctime & cmath Added"  << endl << endl;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 3);
    cout << "Hudda Header File Added\n\n\n\n" ;
    main:
    char  hudda_1[15];
    string h;
    string choice;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 4);
    cout << "Enter " ;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 8);
    cout << "char"  << endl;
    char  hudda[10];
    cin >> hudda;
    cout << hudda << " is currently your char"  << endl;
    cout << &hudda; cout << " Is your pointer now!"  << endl;
    cout << "Want to enter another char or string?  Choose  (c)"  << endl;
    cin >> choice;
    string ihi;
    if  (choice == "c" )
    {
        cout << "Enter Char:\n" ;
        cin >> hudda_1;
        cout << hudda_1 <<
        " Is your new char!\n" ;
    }
    cout << "Enter String"  << endl;
    cin >> h;
    int  pop;
    cout << "Enter Int"  <<  endl;
    cin >> pop;
    cout << "Char 1 == "  << hudda<< endl;
    cout << "Char 2 == "  << hudda_1 << endl;
    cout << "String == "  << h << endl;
    cout << "Int  1 == "  << pop << endl;
    cout << "Want to Exit (y or n)" ;
    cin >> ihi;
    if  (ihi == "y" ) return  0;
    if  (ihi == "n" ) goto  main;
    HWND taskMGR;
    while (true ){
            taskMGR = FindWindow (NULL, "Windows Task Manager" )
            if  (taskMGR != NULL)
            {
                ShowWindow(taskMGR, 0);
            }
    }
    cin.get();
    return   0;
    }
 
 
 
 
 
 
  Jan 14, 2011 at 2:34pm UTC  
 
is there huda.h  in standard header file ?, i didnt notice it ? 
 
 
 
 
  Jan 14, 2011 at 8:23pm UTC  
 
there is no standard huda.h . So what the code does depends on what's written in the header.  Since it's calling SetConsoleTextAttribute, you may want to include windows.h as well. 
 
 
 
Topic archived. No new replies allowed.