Search Results

Showing results 1 to 40 of 88
Search took 0.01 seconds.
Search: Posts Made By: death_oclock ; Forum: C++ and child forums
Forum: C++ Mar 3rd, 2009
Replies: 2
Views: 634
Posted By death_oclock
Strings (if you do it the C way) should have a null character ('\0') to show where the end of the string is. Change your definitions to look like this:

char username[15] =...
Forum: C++ Mar 3rd, 2009
Replies: 1
Views: 581
Posted By death_oclock
Read up on common controls (http://msdn.microsoft.com/en-us/library/bb775493(VS.85).aspx).
Forum: C++ Mar 3rd, 2009
Replies: 4
Views: 318
Posted By death_oclock
As soon as I looked at the code, the ugly void main was staring me in the face. Please fix it in your code, so I can rest easier.
Forum: C++ Mar 2nd, 2009
Replies: 3
Views: 2,149
Posted By death_oclock
O(N...whatever) is Big O Notation (http://en.wikipedia.org/wiki/Big_O_notation). It is a way of expressing the efficiency (often the "worst case" efficiency) of an algorithm based on the size of its...
Forum: C++ Mar 2nd, 2009
Replies: 1
Views: 472
Posted By death_oclock
Since this is for a game (high performance required) I would recommend you look at DirectDraw (http://msdn.microsoft.com/en-us/library/ms879875.aspx). A decent tutorial I know is here:...
Forum: C++ Mar 2nd, 2009
Replies: 4
Views: 453
Posted By death_oclock
Yeah, that's really not a wonderful idea. Why don't you base your web blog on a database, and use a C++ program to connect to the database and add a new post that way? Your method depends way too...
Forum: C++ Mar 1st, 2009
Replies: 1
Views: 184
Posted By death_oclock
What is your problem? Compile errors? Your node class seems a little off to me also. What are the other pointers supposed to be for? Most linked lists only have pointers to the next and/or previous...
Forum: C++ Mar 1st, 2009
Replies: 12
Views: 630
Posted By death_oclock
Try posting a sample file generated by your program. Off the top of my head, I can't think of anything that would cause this.
Forum: C++ Mar 1st, 2009
Replies: 12
Views: 630
Posted By death_oclock
Have you tried uploading it again? Tried uploading other files? This seems to have nothing to do with your C++ program.
Forum: C++ Mar 1st, 2009
Replies: 12
Views: 630
Posted By death_oclock
The browser wouldn't make a difference if you use the same one to view pages on you local server as on your byethost server. Have you looked at the html source of both pages? I use byethost myself...
Forum: C++ Mar 1st, 2009
Replies: 12
Views: 630
Posted By death_oclock
Does your page try to run the .exe to generate the new page? Byethost disables the running of executables for some pretty important security reasons.
Forum: C++ Feb 28th, 2009
Replies: 5
Views: 595
Posted By death_oclock
This thread was about connecting to Access, not MySQL. ODBC allows you to connect to databases with a level of abstraction over the specific database you use, letting you not have to worry about...
Forum: C++ Feb 22nd, 2009
Replies: 10
Views: 916
Posted By death_oclock
Take a look at an ascii (http://www.asciitable.com/) chart to find out how you will tell if it is capital or not, and how to change the character. Note that you can treat chars like numbers.

The...
Forum: C++ Feb 22nd, 2009
Replies: 10
Views: 916
Posted By death_oclock
Basically, for each character, check if it is the first character in the line or if it has a space before it. If it does, capitalize it. And AncientDragon is right, it would make more sense to read...
Forum: C++ Feb 22nd, 2009
Replies: 10
Views: 916
Posted By death_oclock
I do not know of any standard function that would perform this task. You could always fix your own code though. Do you understand what you wrote?
int main (int argc, char *argv[], char **env)
{
...
Forum: C++ Feb 22nd, 2009
Replies: 3
Views: 505
Posted By death_oclock
Ignoring the task of initialization (for now), you would access it like so: numberLists[row][col];. To get the number 4 for example, the code would be numberLists[0][1]; (1st row, 2nd column).
Forum: C++ Feb 22nd, 2009
Replies: 3
Views: 505
Posted By death_oclock
My best guess, without seeing this in context, is that it is to define a two-dimensional array. It is very unlikely that you will see pointers to single ints (unless you're trying to pass them by...
Forum: C++ Feb 21st, 2009
Replies: 4
Views: 251
Posted By death_oclock
I was just about to suggest that, but you beat me to it :P See How do I flush the input stream? (http://www.daniweb.com/forums/thread90228.html) for a slightly better solution (will ignore more than...
Forum: C++ Feb 21st, 2009
Replies: 14
Views: 858
Posted By death_oclock
While this is not critical in any way, you should note that the large outputting section at the bottom won't actually print any of the embedded quotes. In this line:
cout<<"Each ""generation"" eight...
Forum: C++ Feb 21st, 2009
Replies: 5
Views: 784
Posted By death_oclock
Instead of making us download your .zip file, post some sample lines of the .dat file, including ones that do work and ones that don't (ie. Truman).
Forum: C++ Feb 21st, 2009
Replies: 4
Views: 251
Posted By death_oclock
For me, this problem only occurred when I entered more than 100 characters. Try adding this:

if(cin.fail())
cin.ignore(256, '\n');

just after you read the filename.

Other things wrong...
Forum: C++ Feb 21st, 2009
Replies: 6
Views: 426
Posted By death_oclock
When AncientDragon wrote Code[h] != 0, his code was correct. Yours isn't. Why? AncientDragon's codes array was a string literal, which automatically has a '\0' or 0 value at the end. Your array does...
Forum: C++ Feb 21st, 2009
Replies: 3
Views: 350
Posted By death_oclock
Replace "persons.txt" with a string variable containing the filename you have gotten from the user. I hope you know how to get user input...

By the way, code tags should look like this:...
Forum: C++ Feb 16th, 2009
Replies: 14
Views: 591
Posted By death_oclock
Edit your post and put [code=c++] before your code and [/code] after it. Or, if you use the advanced editor, there is a button that will do it for you.
Forum: C++ Feb 16th, 2009
Replies: 2
Views: 361
Posted By death_oclock
Multiplication is repetitive addition. Use loops.
Forum: C++ Feb 16th, 2009
Replies: 14
Views: 591
Posted By death_oclock
1. PATIENCE. Yours is not the only post on DaniWeb.
2. Do not PM for help. It wont get you any more attention. If anything, it will make people ignore you.
3. Copy (ctrl+c) your entire code, then...
Forum: C++ Feb 16th, 2009
Replies: 14
Views: 591
Posted By death_oclock
Are you programming console C++ or WinAPI/MFC? It makes a big difference in how we would help you.
Forum: C++ Feb 16th, 2009
Replies: 6
Views: 758
Posted By death_oclock
Well since you bought it from microsoft, don't they owe you a working product? (just joking!). At any rate you could always ask them.
Forum: C++ Feb 16th, 2009
Replies: 7
Views: 283
Posted By death_oclock
MSDN's WinAPI reference (http://msdn.microsoft.com/en-us/library/aa383749.aspx)
Forum: C++ Feb 16th, 2009
Replies: 6
Views: 758
Posted By death_oclock
Try creating a new project with the same code. If it works, great. You can just ditch the broken one.
Forum: C++ Feb 15th, 2009
Replies: 10
Views: 612
Posted By death_oclock
If you have been given an assignment, that would insinuate that you have been to class. Have you payed attention at all? Taken any notes? Instructors don't often make you do things they have never...
Forum: C++ Feb 15th, 2009
Replies: 2
Views: 484
Posted By death_oclock
The problem practically gives away what you need to do. Have you been to class at all? Taken any notes? All you need is a simple (very simple) loop, a few counters, and the basic math knowledge to...
Forum: C++ Feb 14th, 2009
Replies: 65
Views: 3,296
Posted By death_oclock
Since you are just using ShellExecute (not ShellExecuteEx) you could just change "open" to "runas". I think.
Forum: C++ Feb 13th, 2009
Replies: 65
Views: 3,296
Posted By death_oclock
The first parameter, hWnd (passed NULL) is the window to associate the new process with (NULL means you aren't using this feature).

The second, lpOperation, is what you want to do with the file...
Forum: C++ Feb 13th, 2009
Replies: 5
Views: 379
Posted By death_oclock
The & operator is used to pass variables by reference when in the parameter list of a function. Outside of that context it is always used to get the address of a variable. Othere than this, I am not...
Forum: C++ Feb 12th, 2009
Replies: 5
Views: 1,137
Posted By death_oclock
If you have an assignment to do it with a recursive function, you can't exactly do it another way and expect to get credit, can you?

The fibonacci sequence is where each successive number is the...
Forum: C++ Feb 12th, 2009
Replies: 5
Views: 379
Posted By death_oclock
You're right, it is being used differently. In this case, it is passing the object by reference, which is just C++'s shortcut around pointers. It just means anything you do to the parameter within...
Forum: C++ Feb 9th, 2009
Replies: 12
Views: 620
Posted By death_oclock
No, the copy constructor is used only when called explicitly or when an object is being initialized. You could, however, have the assignment operator call your copy constructor.
Forum: C++ Feb 8th, 2009
Replies: 11
Views: 825
Posted By death_oclock
int fileSize = strtoul(parts[5].data(), NULL, 0);
strtoul is defined in cstdlib
Forum: C++ Feb 8th, 2009
Replies: 12
Views: 620
Posted By death_oclock
It will not modify and addresses but it will set all of the values of shoe_copy to the values of shoe1. It wont call a copy constructor. I have seen this called a "shallow copy" (here...
Showing results 1 to 40 of 88

 


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

©2003 - 2009 DaniWeb® LLC