View Single Post
  #7 (permalink)  
Old 07-21-2008, 06:17 PM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Credits: 0
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: Visual Basic to C++ Syntax Translation

About char().... In C++ that's just a cast from an integer to char (32bit and 8bit), which can be done like this:

Code:
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char * argv[])
{
    int ASCII = 65;
   // int ASCII = 0x41; // In hexadecimal, if you need it
    char c1 = static_cast<char>( ASCII ); // Declare c1 as char, and perform cast
    cout << c1 << endl; // Display character (Uppercase A)
    system("PAUSE");
    return (EXIT_SUCCESS);
}
__________________
Reply With Quote