15,300 Posted Topics
Re: I posted on DaniWeb. Why do you think I have such a high post count :) | |
Re: Diablo III -- I spend several hours a day at it. I've been playing the Diablo series from Blizzard for over 10 years! | |
Re: By gap buffer do you mean a character array that holds the characters that are typed from the keyboard? All you need is an integer whose value is the position in the character array where the next character is to be stored. Where the gap starts? At the beginning. char … | |
Re: Compile for debugging then learn to use your compiler's debugger to single step through the program. When you learn to do your own debugging you will be better able to find such problems yourself. | |
Re: you don't need to call cmd.exe explicitly -- the system() function will do that for you. All you have to do is tell system() what program you want to run [code] system("C:\Program Files\PowerMenu\PowerMenu.exe") [/code] | |
Re: It will depend on what you mean by external source. An SQL database, a file, over the internet?? | |
Re: Why would anyone want to visit Munbai or New Delhi, which are on the list of the [10 most polluted cities in the world](http://factspy.net/top-10-most-polluted-places-around-the-world/). | |
Re: My guess is that very few people of my age group have that disease because we grew up in an age long before cell phones and even Star Trek with their communicators. So it doesn't bother me at all to not have a cell phone implanted in my head and … | |
Re: Not advisable. There are other tools that are a lot better for that. A good friend of mine is right now in school learning animation and doesn't know a thing about computer programming. It's all about drawing each frame then using another program (I don't know what it is) that … | |
Re: >vector<string> db(string input) That function doesn't return anything. | |
Re: your test() is doing too much work! The solution is much simpler. void test() { double x; double y; double z; #if 0 cout << "Enter price 1:"; cin >> x; cout << "Enter price 2:"; cin >> y; cout << "Enter price 3:"; cin >> z; #endif x = … | |
Re: >// I tied this too didnt work I think the problem is that MFC doesn't have a chance to process the message(s) until after that function returns. You need to add your own message pump after that line (see [this article](http://www.microsoft.com/msj/0795/dilascia/dilascia.aspx) for full explanation). MSG msg; while (GetMessage(&msg, NULL, 0, … | |
Re: I don't like their music (trashy as it is) but I do respect their right to get paid for playing it. Afterall, no one wants to work for free unless its for charity or something like that. [quote]With the release of Load in 1996, Metallica distanced itself from earlier releases … | |
Re: vector::reserve does NOT initialize the vector with the structures, reserve() only allocates memory for them. Your program still must call vector::push_back() or vector::insert() The second problem with your function is that the first element of all arrays (vector is an array) is 0, not 1. And the max element index … | |
Re: Create another thread. See [this article](http://www.tutorialspoint.com/cplusplus/cpp_multithreading.htm) | |
Re: The people who post om Facebook, especially the ones I haven't seen for a long time. >especially my little brother's. he's just 6 months old. I hope you still feel that way when he's 15 :) | |
Re: >from apple; operating system That explains everything :) | |
Re: lines 31 and 32: what are you attempting to do there? chara arrays do not have overloaded operators such as >> If you want to copy the arrays then use strcpy() function. Either read your textbook or google to find out how to use that function. | |
Re: >Is there any way of running and compiling with known errors in the code. Compiling? yes, running? No because the program has to be error-free in order to execute the code. There is no point in trying to execute a program that contains compile-time errors. How do you expect the … | |
Re: what do you want to know about it? c++ objects are normally passed by reference to avoid expensive duplication and to let other functions use the same object as the calling function. [code] class MyClass { // blabla }; void foo(MyClass& obj) { // class passed by reference } int … | |
Re: I've been using 2012 for a couple weeks now. It isn't much different that 2010, except you can't get just VC++ 2012 like you could vc++ 2010. Instead, you get the whole Visual Studio suite of compilers. I had VS2012 RT and VC++ 2010 installed at the same time and … | |
Re: post what you have done so that we can help you. I would probably read the contents of File B into an array in memory then search that array for each line in File A. | |
Re: Why don't you just write it yourself instead of begging us to do your homework for you. I charge $1,000.00 USD to do your homework. | |
Re: on line 40 the parameters to removename() are reversed, you have them backwards. | |
Re: Are you trying to create a 2d array of integers where each dimension is the same size? Here's how to do it. (It's spelled int, not Integer) Think of a 2d array much like a chessboard which has rows and columns. The rows are the first dimension and the columns … | |
Re: The only way to replace one string with another string in a text file is to completely rewrite the file. Open the original text file for reading, open a temp file for writing. In a loop, read each line of the original file and rewrite it to the temp file, … | |
Re: Check out some of [these articles](http://www.codeproject.com/search.aspx?q=lockbits&x=0&y=0&sbo=kw). Most are for C# but they should apply to CLR/C++ as well. You should bookmark that site because they have the largest repository of free code/examples on the net for MS-Windows programming. | |
Re: New memory allocated in a DLL must be deallocated in the DLL. You can't allocate memory in a DLL then deallocate it in the application program because the two have different memory heaps. [Here](http://forums.codeguru.com/showthread.php?512690-problem-allocating-memory-in-dll-and-freeing-in-application) is another thread on that topic. | |
Re: >i want the array(totalwin) t You mean totalsum, there is no variable named totalwin line 46 is saving the same value in totalsum three times. If you want each element of that array to contain the value of sum each time the loop repeats then you need a loop counter … | |
Re: A buffer is normally just a block of memory where things can be stored in RAM. A stream is something that lets you store things on disk, send across to other computers such as the internet, serial port, UCB, etc. streams often use buffers to optimize transmission speed. For example … | |
Re: [QUOTE=aramil daern;1679291]it says hello world... it might do what you want to but it is overkill[/QUOTE] despite the infinite loop at the end of main(). | |
Re: I think the yellow folders are the ones you have never posted in. | |
Re: See [this tutorial](http://www.codeproject.com/Articles/608/Using-the-List-Control). You need to bookmark that site codeproject.com because it has probably the largest repository of free MS-Windows Visual Studio code on the internet. | |
Re: I went to WalMart a couple years ago on black Friday, went about midnight. It was lots of fun, the most people I've ever seen at WalMart the same time. It took about an hour to get through the checkout register. I might do it again this year just to … | |
Re: graphics.h was non-standard 16-bit Borland compiler specific. M$ compilers never supported it. You will probably have to download free copy of Turco C to compile that program. | |
Re: You need to post the code you wrote. I (we) don't do your homework for you unless you deposit $1,000.00 USD in my PayPal account. | |
Re: Same answer as in your other thread[ here.](http://www.daniweb.com/software-development/c/threads/440581/question) | |
Re: what are the errors? And what compiler and operating system? | |
Re: lines 1 and 3 are not valid statements. Also, there is a memory leak on line 4 because it doesn't delete the pointer allocated on line 2. | |
Re: line 8 points to an address that was deleted in line 7. Once the memory is deleted you can't reference it again. | |
Re: If you want to save the structures then don't use pointers in the structure. Below is an example of how to read/write the structure in binary files. Note that to open the file for writing you will probably want to use other flags than "wb" because "wb" will not save … | |
Re: line 288: Where is the memory being allocated for the members of that structure? All I see is unallocated pointers, which is why your program crashes when it tries to execute that scanf(). scanf() doesn't allocate memory, you have to do that yourself before calling scanf(). One way to fix … | |
Re: The ONE word solution certainly would NOT be "religion" because that's been the cause of most of the world's violance. | |
Re: Reading looks to be ok, what you need to do is move lines 29 and 30 inside the loop so that it prints each of the lines. | |
Re: Look in that file (afxcmn) and check line 544. Most likely its a NULL pointer or invalid HANDLE that is being passed to it. I don't have that file installed on my computer so I can't check it for you. Put a break point in your program where it calls … | |
Re: I don't think anyone else can either :) VB.NET doesn't let you get down to the hardware level like C and Assembly do. | |
Re: That's exactly the purpose of loops. There are three types of loops 1. for-next 2. while 3. do-while To answer your question, all you have to do is put one of those three around lines 7-11, enclosing them in { and }. Look up loops in your textbook for further … | |
Re: No, but if your math skills are up to par you should be able to figure it out from[ this article.](http://en.wikipedia.org/wiki/Deterministic_finite_automaton) |
The End.