No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Hello, I am trying to create a program where I can work with an array of char that contain either 0 or 1 representing a decimal number that the user enters. Basically I need to convert a decimal number into binary and store it into a char array. I wrote … |
|
So i have the following code: [CODE] //main program char username[15] = {'r','g','f','i','r','e','f','l','y','2','4'}; char password[9] = {'1','2','3','4','5','6','7','8'}; if(client.Send(15,9,username,password)) { printf("Connection Successfully Established"); } [/CODE] [CODE] //class file bool Class_Name::Send(int usize, int psize, char *username, char *password) { itoa(usize,sendbuffer,16); // works fine itoa(psize,sendbuffer + 1,16); // works fine for(int i = … |