Forum: C++ Feb 20th, 2009 |
| Replies: 7 Views: 542 How do I manipulate the bytes if they are stored as chars? |
Forum: C++ Feb 20th, 2009 |
| Replies: 7 Views: 542 What I am planning on doing is bitwise operation on the 8 bytes read in from the file. I was thinking of converting the 8 bytes to an integer value, then I remembered ints in windows are 4 bytes. Is... |
Forum: C++ Feb 19th, 2009 |
| Replies: 7 Views: 542 Thank you. I do have one question though. What does the ios::binary do, does that translate the hex digits into binary when read into the buffer? |
Forum: C++ Feb 19th, 2009 |
| Replies: 7 Views: 542 I am writing an implementation of a DES encryption with a 64 bit plaintext, taken from the pixel information in a BMP file. So I want to skip the header which is 54 bytes, but I am not sure how to do... |
Forum: C++ Nov 6th, 2007 |
| Replies: 13 Views: 5,338 I'm slightly confused as to why the unsigned char makes a difference?
On a side note: I spoke to my professor last week and apparently we are able to use strcat, so I started using that and it... |
Forum: C++ Nov 1st, 2007 |
| Replies: 13 Views: 5,338 I just wanted to change the first character in the sentence to uppercase, what would I change to do that? |
Forum: C++ Oct 30th, 2007 |
| Replies: 13 Views: 5,338 Sorry if this is getting annoying to anyone,
I tried the following:
void printSentence(char *sentPtr){
char *sent = sentPtr;
toupper(*sent);
while(*++sent);
*sent++ = '.';
*sent = 0;... |
Forum: C++ Oct 30th, 2007 |
| Replies: 13 Views: 5,338 do you mean something like this:
void printSentence(char *sent){
*sent = toupper(*sent);
while(*++sent);
*sent++ = '.';
*sent = 0;
cout << sent << endl;
return;
} |
Forum: C++ Oct 30th, 2007 |
| Replies: 13 Views: 5,338 I fixed the while loop but im still getting the same result as before, just 20 blank sentences. |
Forum: C++ Oct 30th, 2007 |
| Replies: 13 Views: 5,338 Trying to write code to concatenate two arrays of pointers to chars (char* example[])
The program should randomly generate a sentence using 4 arrays of prepositions, nouns, adjectives, and verbs.... |
Forum: C++ Oct 27th, 2007 |
| Replies: 2 Views: 1,394 Thats why. Thank you. I had it the way you had it before, but you are right about it being passed to a function. |
Forum: C++ Oct 27th, 2007 |
| Replies: 2 Views: 1,394 I am working on a project to demonstrate the use of strings without using "strings" in the formal definition, as in using pointers to arrays of characters.
The program is supposed to pick a string... |