Search Results

Showing results 1 to 12 of 12
Search took 0.02 seconds.
Search: Posts Made By: weasel7711 ; Forum: C++ and child forums
Forum: C++ Feb 20th, 2009
Replies: 7
Views: 542
Posted By weasel7711
How do I manipulate the bytes if they are stored as chars?
Forum: C++ Feb 20th, 2009
Replies: 7
Views: 542
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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
Posted By weasel7711
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...
Showing results 1 to 12 of 12

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC