15,300 Posted Topics
Re: That behavior is nothing new -- they've been doing it every since TV was invented. I remember lots of talk about the same subject when I was a kid, some 50 years ago (or so ). | |
Re: > fprintf(fp,"%s %s",ii->nome,ii->num); The problem is that you have to put '\n' at the end. And your program won't work at all if you put a space in the name that you enter, such as "John Smith" or something like that. fprintf(fp,"%s %s\n",ii->nome,ii->num); | |
Re: [Here](http://www.dreamincode.net/forums/topic/17635-exe-icon-change/) is one way to add an icon to your C or C++ programs. | |
Re: Since the table is an array of integers, there is no such thing as null elements, every element has a value. NULL is defined as 0 in most operating systems and compilers, and that's why p[0[0]=NULL doesn't work the way you want it to work. A work-around is to set … | |
Re: It's not fixed. I see problems with the cursor in Chrome. | |
Re: >random_number = (rand()%0)+1; Why %0 ? That's a do-nothing statement. line 31, main.cpp. The value of variable n is 0 | |
Re: > Is there any KEYWORD in C++ (may be advanced C++) to replace a value or variable?? No c++ itself doesn't support GUI programs, but if you have the express version of vc++ you can create Windows Forms application in CLI/C++, which is a superset of c++. If you have … | |
Re: You have to learn how to write the file in jpeg format, as in [this link](http://class.ee.iastate.edu/ee528/Reading%20material/JPEG_File_Format.pdf) and this [wiki article](http://en.wikipedia.org/wiki/JPEG) | |
Re: You need to look at the class constructor to see why it need a char*. argv[1] is just whatever you type on the command line folowing the program name. | |
Chrome on Windows 7 goes crazy when trying to scroll in [this thread](http://www.daniweb.com/software-development/cpp/code/426698/scope-guarded-lockable-objects-in-c11). Use the mouse to use the scrollbar on the right. | |
Re: Go to Project-->Build Options-->Linker Settings tab, then click the Add button so that you can add the name of the file. Libraries must be in the format libXXX.a, same as in unix gcc or g++ After looking at the link you posted all you will get is the source files … | |
Re: You have to test for folders. [Here's a code snippe](http://www.daniweb.com/software-development/cpp/code/216812/searching-linux-directories)t that will show you how that's done | |
Re: Another way to do it is to call [CopyFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363851(v=vs.85).aspx)() instead of SHFileOperation(), its a lot easier to use. To answer your question, you have to call a conversion function such as [one of these](https://www.google.com/#hl=en&sclient=psy-ab&q=c%2B%2B+convert+char*+to+wchar_t*&oq=convert+char*+to+wchar_t*&gs_l=hp.1.1.0j0i5j0i33i30j0i5i33i30.0.0.1.1132.0.0.0.0.0.0.0.0..0.0...0.0.BolxtCmjHc0&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=b4c92a2d29177826&biw=1031&bih=545) to convert char* to wchar_t* | |
Re: The correct answer is that the result is undefined, or unpredictable. It depends on the compiler -- the answer by some compilers may be 5,5,5 because only the last version is stored. Yet other compilers, such as VC++ 2005 Express will give 6,5,5. | |
Re: The code you posted doesn't really delete anything, all it does is return one of the nodes in the linked list. You need to post the code that calls those two functions so that we can see what it does with the pointers. And yes, if you used malloc() to … | |
Re: There is no solution using standard C/C++ variables such as long double because they have a finite limit before overflow occurs. Check your compiler's limits.h header file to find out what your compiler supports. If you need that large of numbers then I'd suggest using one of the huge number … | |
I just learned about the[ death of Andy Griffith](http://www.facebook.com/photo.php?fbid=390747217654056&set=a.143890322339748.32855.132593840136063&type=1&ref=nf) and it was like loosing an old close friend. May he RIP. | |
Re: One way to avoid all those if statements is to set up an array of function pointers and parameter strings, then you can use a loop to iterate through the array to match the input parameters with the parameter strings in the array's structure. If the structures are in sorted … | |
Your namne change is not complete. Look at the far-right column on [this page](http://www.daniweb.com/community-center/daniweb-community-feedback/26) (and others just like it) It still shows cscgal | |
Re: > Don't get me started of petrol prices in the UK ! I'm spending £60-£70 on the stuff in an average week at the moment. I think I would ditch the auto and ride a bike. That's terrible price for petro. | |
Re: you have to allocate memory (see malloc or new) for nameBuffere before you can copy something to it. Also, I don't see any \* in the example you posted -- maybe because DaniWeb editor deleted them. If you want a star then you will have to escape it, such as … | |
Re: [try this solution](http://wprockers.com/how-to-remove-proudly-powered-by-wordpress-from-twenty-eleven-theme-1120.html) | |
Re: Just change the loop so that i is initialized to sizeOfArray-1, and loop until i == 0 | |
Re: It worked ok for me, using [this thread](http://www.daniweb.com/software-development/vbnet/threads/426920/calling-method-from-class-in-vb-2010) as test, then pasted it into Visual Studio and Notapad. How did you copy it to the clipboard? I just double clicked the code, then after seeing it turn blue I right clicked and selected copy from the popup menu. | |
Re: The title should be ["Whether"](http://dictionary.reference.com/browse/whether), not "wether" | |
Re: C is a 2-dimensional vector. In c++ you can represent it like this: vector<vector<NS>> C; C.resize(NE); There are other ways to do it as well, such as[ this boost library](http://www.boost.org/doc/libs/1_50_0/libs/multi_array/doc/user.html) Or you could just use a simple array such as int C[NE][NS]; assuming NE and NS are constants, or you … | |
Re: The editor looks ok to me. The only problem I have with it is that confusing instant preview, makes me think I have double vision problems :) | |
Re: I don't like it, I find it confusing. The toggle idea is a good alternative, maybe put it in our profile page. | |
Re: Line 15 fails because Node_B has not been declared yet. Reverse the order of Node_A and Node_B and it should compile. | |
Re: I'm shocked! You should have been horsewhipped for writing that horrible stuff :) | |
Re: > AIstruc_word Add a constructor which initializes the two pointers to NULL | |
Re: There are probably lots of ways to do it, but I would start out with a structure that contains two items: command and count. Then put the structure in an array or linked list. Once that is done it can be evaluated in a loop by iterating through the array … | |
Re: >>I want to track a time I spend on each project Use your watch and enter the times in an Excell spreadsheet. Or maybe something like [URL="http://www.autotask.com/landing/project_tracking.htm?source=GG_ProTracking_PTLanding&gclid=CKacueXu5o8CFRusGgod72cbDQ"]this[/URL], which you have probably already seen. | |
Re: [URL="http://www.adp-gmbh.ch/win/misc/mshtml/index.html"]Here[/URL] is one of several examples I found with [URL="http://www.google.com/search?hl=en&q=how+to+make+c%2B%2B+web+browser"]google.[/URL] | |
![]() | Re: lines 8 and 9: remove the typecast because it isn't necessary. If all you want to do is display all the alpha letters A-Z and a-z then the two loops should not be nested. What does your book say how the letters should be displayed? ![]() |
Re: > if (ch >= 'A' && ch <= 'Z') header file: you didn't finish the if statement. Those two functions in that header file need to be moved to the *.cpp file becuse it will cause duplicate link errors if you include the header file in more than one *.c … | |
Re: linked lists that can be read backwards are called double liked lists because they have both a next and previous pointers. The previous pointer at the head is NULL so that you can detect the end of the list, and the next pointer at the tail is NULL for the … | |
Re: Yes there is a difference between the two str = "Test", the pointer just simply points to a string literal that resides in read-only memory and whose memory was allocated by the compiler when the program was compiled. The compiler reserves a whole block of memory in your program for … | |
Re: put a loop in main() int main() { while(1) { gi(); display(); eval(); } return 0; } | |
Re: printf("%d", \*(int\*)6295600) | |
Re: why would you want alloc.h? You don't need it to just allocate memory with malloc(), which is declared in stdlib.h. | |
Re: what gui toolkit, compiler and operating system ? | |
Re: Are you confused because the output is not a double (with some decimal places) or because of the number of digits? The output isn't a double with decimals because your program is doing integer division, not double division. Typecase either the numerator or denominator to double and it will do … | |
When I hit the Edit button and start editing a post can you get rid of the Reply To This Article button because its confusing to have two buttons that do about the same thing (Reply and Save Changes). I expect the button I need to press to be the … | |
Re: My favorite IDE on MS-Windows is VC++ 2010 Express (free), but there are several others almost as good such as Code::Blocks. All C++ compilers that I've heard about also compile C code -- just give the file \*.c and it will be compiled as C code, while \*.cpp file name … | |
Re: there are hundreds of them -- just use google. [URL="http://www.tutorialized.com/tutorials/Visual-Basic/Database-Related/1"]Here [/URL]are the ones from Microsoft |
The End.