868 Posted Topics
Re: [QUOTE]My problem is that I can't get the blasted file(s) read in! I can read a single file (e.g."junk.txt") and do the comparisons, but I can't get the directory file thing to work. Also, one type of file (jpg) will be of an indeterminate size. [/QUOTE] What does "directory file … | |
Re: Do you know the meaning of this? [QUOTE]A square has 4 vertex then the degree of each vertex is 2.[/QUOTE] | |
Re: Lines 23 to 25 in your code seems to be useless. I don't think there is the need to move to the end of List1 in order to update LastNode which needs no updating. Did a rewrite. Maybe buggy since I don't have the class declaration of node, so use … | |
Re: Explaination is the same as what navedalam said. But I am surprised that this even compiles. At least there should be some compiler warnings. In any case, this kind of usage has to be handled with great [URL="https://www.securecoding.cert.org/confluence/display/seccode/INT11-C.+Take+care+when+converting+from+pointer+to+integer+or+integer+to+pointer"]care[/URL]. [icode]int *ptr=10,j;[/icode] [icode]ptr[/icode] is a [icode]pointer to int[/icode]. [ICODE]j[/ICODE] is an [icode]int[/icode]. … | |
Re: The problem must be with how the assignment operator [icode](operator=)[/icode] is implemented. Is there any documentation regarding that? | |
Re: You have created a [iCODE]Win32 Console Project[/iCODE]. Select [iCODE]Win32 Project[/iCODE] | |
Why do even C/C++ [URL="http://www.daniweb.com/forums/thread349777.html"]posts[/URL] have the #webdevelopment tag(?) when retweeted? What is going on? [QUOTE][url]WWW.DANIWEB.COM[/url] - #webdevelopment : Getting argv[] command line arguments.: Hello, Simple question this time, I ho... [url]http://bit.ly/grklp6[/url] #harshgandhitk [/QUOTE] | |
Re: The problem should be related to the one pointed out in this [URL="http://www.daniweb.com/forums/post155265.html#post155265"]post[/URL]. Post whole code for the [icode]SequenceAds[/icode] class. | |
Re: Without replacing the digits with x as you find them, remember the first digit you encounter while you scan the string. Move ahead until you find a non-digit. [URL="http://www.cplusplus.com/reference/string/string/replace/"]Replace[/URL] sub-string from the first digit to the one before the non-digit with a single "X". There are many ways to do … | |
Re: AXIMP seems to be related to [URL="http://www.google.co.jp/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=AXIMP+%3A+AxImp+error&btnG=Search&aq=f&aqi=&aql=&oq="]VB6 Active X controls[/URL]. Give details of the project. I haven't personally come along these type of errors in my work, but maybe someone else who are doing the same kind of projects may have and will be able to help. | |
Re: [url]http://www.daniweb.com/forums/post1485016.html#post1485016[/url] | |
Re: You code? [URL="http://www.daniweb.com/forums/thread335547.html"]Really[/URL]? Read the [URL="http://msdn.microsoft.com/en-us/library/ms533798%28v=vs.85%29.aspx"]documentation[/URL]. Much of programming is basically figuring out how to use the building blocks given in a library to build what you want. Nobody can do the thinking for you. | |
![]() | Re: Do you want the above function to be called when button "Hello" is clicked? |
Re: It should be `#include <cmath>` and remember to use **CODE** tags the next time. | |
Re: [QUOTE]are there any solutions? [/QUOTE] Without knowing what you want to do, we can't give any. Learn to properly format the question. [LIST=1] [*]Remove unnecessary code (Code that is not relevant to the problem you are having). For example, the MessageBox calls with 6 to 7 lines of useless text … | |
Re: Can't you just use [icode] fileOut << linea <<"</br>" <<endl;[/icode] in line 34? | |
Re: Also [ICODE]delete[/ICODE] the memory allocated for [ICODE]ImageData[/ICODE] after you've finished. | |
Re: Um. I think you got it confused dragon. He is infact looking to read an XML file. So I think your first link is correct. | |
Re: Go through [URL="http://www.daniweb.com/techtalkforums/thread67837.html"]this [/URL]and [URL="http://www.daniweb.com/techtalkforums/thread78320.html"]this[/URL]. Try hanging around the Daniweb C++ forum and answering some of the problems. | |
Re: I don't see any problem except, you are using <iostream.h>. What problems are you having? | |
Re: I would recommend Petzold's book too. It is a must have if you are starting in Windows API Programming. For the time being, see if you can understand the example given in this [URL="http://msdn.microsoft.com/en-us/library/dd145133(v=vs.85).aspx"]link[/URL]. | |
Re: Right. This is what you should do. 1. Open the file ( You have already done that) 2. Read the opened file line by line into a string (lets call it [inlinecode]line[/inlinecode]). You can use [URL="http://www.cppreference.com/cppstring/getline.html"]getline [/URL]for this. 3. Create a [URL="http://www.cppreference.com/cppsstream/constructors.html"]istringstream [/URL]object lets call it [inlinecode]isstream[/inlinecode], from the string … | |
Re: An Indian was sitting with a Pakistani and an American in Saudi Arabia, sharing a smuggled barrel of beer, when all of a sudden, Saudi police entered and arrested them. They were initially sentenced to death but they contested this and were finally imprisoned for life. But, as it was … | |
Re: [QUOTE=Ancient Dragon;506839]How do you recognize one paragraph from another? There is no standard way to separate paragraphs like there is to separate lines. So your first task is to clearly define what constitutes a paragraph. Counting the number of '\n's is counting lines, not paragraphs. So you will have to … | |
Re: [quote=complete]Where is a good source for learning Design Patterns?[/quote] [URL="http://www.google.com/search?hl=en&lr=&q=Design+Patterns&btnG=Search"]Google[/URL] perhaps. [quote=complete] Has anyone heard of what is called "Gang of 4" and "Model via Control"?[/quote] You can find Gang of 4 in one of the resulting webpages above. Model via Control..hmm. Maybe you mean [URL="http://www.google.co.jp/search?q=model+View+Controller&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official"]model View Controller[/URL] | |
Re: maybe [URL=http://www.sqlapi.com/]this[/URL] will help. | |
Re: An algorithm is a sequence of steps that describe what a program should do. It is normally written before the program. So, if you can describe step by step what this program does, that is the algorithm. It is not rocket science. Just tell us what you think this program … | |
Re: If you look at the part called [B]Similar Threads[/B] at the bottom of this webpage you will find a lot of threads with examples. | |
Re: Not sure about the theory. But here is a working code. [code=C] #include <stdio.h> //#include <iomanip> why are you including this? You are not using it. int main() { int binary1[8] = {0,1,1,1,1,0,1,1}; //8 element array int binary2[8] = {1,0,1,0,1,1,1,1}; //8 element array int binarySum[9] = { 0 }; // … | |
Re: If you have 50 questions, the following code will print 10 numbers within the range of 0 to 50. The same number may get printed multiple times, but you can get rid of that by modifying the code to re-loop if an already printed number is obtained. [CODE=cpp] srand( time(NULL) … | |
Re: [URL="http://www.winprog.org/tutorial/"]Forger's Tutorial[/URL] | |
Re: Change [icode]void displayPayment (double, double&);[/icode] to [icode]void displayPayment (double);[/icode] | |
Re: Looks like a setup issue of the OpenCV Library. Can you run a basic program that just loads an image and displays it? If not, I would suggest going through the installation instructions back from the beginning. Also, give us information about your compiler and operating system next time. | |
Re: [code=text] /bin/sh: g++: not found [/code] means just that. Eclipse IDE can't find the compiler. Read the setup instructions carefully. | |
Re: Had a look at the photos. Fab. event. Congrats to Dani and the party organizing team. I'll try to come next time. Didn't recognize anybody except Her Majesty in the photos though. | |
Re: There are plenty of example source code in the [URL="http://www.google.co.jp/search?hl=en&q=Simple+Web+Server+Program+in+C&aq=f&aqi=&aql=&oq=&gs_rfai="]web[/URL]. Refer this [URL="http://beej.us/guide/bgnet/"]guide [/URL] for a start. | |
Re: You can try and see if there the source code is given to you with the compiler CDs. Or maybe in the [ICODE]src[/ICODE] directory of the installation. However, I highly doubt it is necessary for you to look in to the source code. Just knowing how to use the functions … | |
Re: I don't know about efficiency, but you can save a lot of code by using the [URL="http://www.cppreference.com/wiki/stl/list/unique"]list::unique[/URL] method. The number of items deleted is the item count difference between the previous and current list. [URL="http://msdn.microsoft.com/en-us/library/thhhbacy(VS.80).aspx"]example[/URL] Edit: However you have to use the std::list. Can't be used for your custom list … | |
Re: If you are using the MFC or Win32 APIs, any of the [icode]OnClose[/icode], [icode]DestroyWindow[/icode] functions, or the [icode]WM_CLOSE[/icode] event can be used. Read the documentation to find the best one for your needs. Even if you are using some other development environment with custom APIs, they usually have functions with … | |
Re: Yesterday was just not England's day. Both in Cricket and Football. Losing Owen was bad enough. But also without Beckham and Rooney, I'd say it is expecting too much from them. Too bad. I would have liked to see England win. But the dissapointment faded to see France win over … | |
Re: If it is your code, and you wrote that line, how come you are asking us what the meaning of that particular line is? Anyway, judging from the meaning of the word Re-entrant, that would mean that this program is designed to be run in multiple threads, and very well … | |
Re: Well, Visual C++ 2008 is not a bad idea. Provided you know what you are doing. What learning material are you using in the first place? And where did you get the code for that program? This [URL="http://msdn.microsoft.com/en-us/library/dd757161%28VS.85%29.aspx"]link [/URL] makes it clear that it is not an entry level program. … | |
Re: Surely a memory leak. delete the pointer to the table once you are done using it. Are you calling the above code inside a loop? | |
Re: You should try it yourself first. First write the steps you would take, if you were to do it in real life. You can do it in a spoken language you are familar with. After writing it, then try to convert it to C/C++. If you try it yourself, and … | |
Re: The reason is the code for changing the picture runs at wm_paint. Wm_paint is passed when the windows needs redrawing which happens everytime you minimize, maximize, drag some other application above your app etc. If you want to select your picture only during once startup, do it at the wm_create … | |
Re: Buy the book [URL="http://www.amazon.com/Operating-Systems-Implementation-Prentice-Software/dp/0131429388"][B]Operating Systems Design and Implementation, Third Edition[/B] By Andrew S. Tanenbaum[/URL] and follow it with the source code of [URL="http://www.minix3.org/"]Minix[/URL]. | |
Re: It is a fairly basic programming exercise on loops. If you Google you could easily find the answer. Post the work you have done so far for this assignment. Someone will help you with the places you are stuck. | |
Re: You could modify the examples given in one of the links below, and some basic C++ String matching. 1. [url]http://stackoverflow.com/questions/143174/c-c-how-to-obtain-the-full-path-of-current-directory[/url] 2. [url]http://msdn.microsoft.com/en-us/library/aa364934%28VS.85%29.aspx[/url] [QUOTE=chrishtones;1165822]How would I write a program that can tell what directory it is in? For example, how would I write a program that can tell if it is … |
The End.