15,300 Posted Topics
Re: Why are you asking us if your program is correct? You should be able to determine that yourself by testing the code you wrote. If the program does everything the question wanted then it is correct. There may or may not be better ways to code it but that doesn't … | |
Re: My grandaughter is already done with spring break, back to school last Monday. As for me, I'm ALWAYS on spring break :) | |
Re: Is the drive on the server a shared drive on each of the client computers? I have a home network setup like that, Windows 8 on one computer that shares a folder with other Windows 7 computers. When I'm on Windows 7 computer right click the shared drive I do … | |
Re: The problem is not your program but rather the largest number that can be stored in an integer. Look at the file limits.h that is supplied by your compiler and it will tell you the maximum value that can be stored in an unsigned long int. There is nothing you … | |
Re: Don't expect anyone here to do your homework for you without lots and lots of $$$. | |
Re: you stated the objectives but forgot to ask a question. | |
Re: If you are using CDocument then you can get a handle to CView derived classes from there -- CDocument conbtains a linked list of CView class objects. From CDialog you will want to get the handle to CDocument from CWinApp (I don't recall the exact details as it's only been … | |
Re: The simplest way is to generate a CSV file and have Excel import it. The CSV file format is very simple, each field is separated by either a comma or a tab. If the text for a given field can contain commas then use tab to deliminate the fields. Excel … | |
Re: OMG why in the world are you doing that just to extract the name part of the string! If the CString already contains the full path + filename just use its Find() method to locate the last '' and you have the name starting with the next character. >>That mean … | |
Re: The exe is probably already running. Look at Task Manager and kill it if it is showing as a process. | |
Re: Kind of difficult for us to give you any advice without knowing the contents of the files. Post a few lines from each file so that we can see what you are talking about. | |
Re: The drivers already exist, you don't have to write them. Read [this article](http://stackoverflow.com/questions/4985909/how-to-set-and-read-pins-on-the-parallel-port-from-c) and follow the links to examples in codeproject.com | |
Re: The same can be asked about USA budget -- or lack of one. Nobody and no government knows how to spend beyone their means like Americans. | |
Re: Of course it's identical to the way you would validate input from scanf(). argv is just an array of strings. argv[0] is always (if the os supports this) the name of the executable program and each string after that is whatever you put on the command line. If you execute … | |
Re: If the description is in the file it will be read into str[0] | |
Re: MS-Windows knows nothing about opendir() etc -- those are \*nix functions, not MS-Windows. You need to call[ FineFirstFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx)() and FindNextFile() which work something like the \*nix functions. I have posted some [code snippets](http://www.daniweb.com/software-development/cpp/code/216612/transversion-system-directories) that use those functions if you want to look at them. If you use .NET you can … | |
Re: >, only native C++ code is supported.) > Its a windows form application Windows Forms is NOT native c++, it's .NET CLR/C++ which is a different language. | |
Re: > An actual physical person is not a kind of head, or a kind of arm, or a kind of body, When put that way you are right, but a Person consits of a Head, arm, legs, body, etc. As in almost all programming, for every programmer there is a … | |
Re: It won't compile with Microsoft Visual Studio because M$ has not implemented many things in the C99 standards, such as declaring variables in the middle of functions like you can in c++. | |
![]() | Re: >I'm going to start sending out mass-emails to community members who have been around awhile. Probably not a good idea, we get enough spam already. I didn't see anything wrong with the original placement of the badge. On a PC it didn't take up any more real estate. |
Re: I only drink Bud Light on tap, and then only on special occasions such as going to really nice restaurant. I bought two [special edition cases](http://www.ebay.com/itm/Budweiser-St-Louis-Cardinals-2006-World-Series-Champions-Aluminum-Beer-Bottle-/140918467661?_trksid=p2047675.m1850&_trkparms=aid%3D222002%26algo%3DSIC.FIT%26ao%3D1%26asc%3D11%26meid%3D5924316340428973713%26pid%3D100011%26prg%3D1005%26rk%3D1%26sd%3D190787675728%26) (24 bottles/case) two years ago when St Louis Cardinals baseball team won the baseball World Series, I stll have all the bottles, but drank … | |
Re: xcopy is an old old MS-DOS command, not implemented on MS-Windows 7/8 (don't know about previous versions of MS-Windows). You might consider win32 api function [SHFileOperations](http://msdn.microsoft.com/en-us/library/windows/desktop/bb759795(v=vs.85).aspx) or the simpler to use and understand [CopyFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363851(v=vs.85).aspx) along with [FindFirstFile and FindNextFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx) to get the list of folders and files to be copied. | |
Re: will is compile a HelloWorld program? | |
Can I use my DaniWeb member badge on Facebook? If yes, how to do it. | |
Can you expand the list of emails that can be enabled/disabled in our Profile page? I get a lot of emails when someone votes on one of my posts or received an endorsement -- I would like to turn those off so that I don't get them. The only ones … | |
Re: My guess is that the value of Stack.Top is 0. You should use your debugger to inspect its value. | |
Re: Have you studied [URL="http://winprog.org/tutorial/"]this tutorial[/URL]? | |
Re: If each loop is separated with a space then the loop that uses strtok() isn't going to work they way you have it coded. It might be better to do it like the method you commented out. If you expect anyone to actually change the code for you then you … | |
Re: Well, where is dsound.lib??? If it's not in one of the standard compiler's lib folder you will have to tell the compiler where to find it. | |
Re: I've seen that happen every once in awhile -- when it happens just hit the Flag Bad Post button and ask a mod to delete the duplicate. | |
Re: Depends on how you declared the variables. If you used int then you can get twice as much space by declaring either long long or __int64 (compiler dependent). Microsoft compilers recognize long long data type but it is the same size as a long. Another way is to use a … | |
Re: strlen() will tell you hows many characters are in a string. If you are not allowed to use that function then count each character in a loop from the beginning of the string until the null-terminating character 0 is reached. | |
Re: static class methods do not have an instance, they are always present in memory just like a normal global function. When you pass a function as a parameter the function is passed by address very similar to arrys and the address must be known at compile time, not runtime. The … | |
Re: you solve it by declaring the variables somewhere. lines 36 to 39 do not declare variables, whose lines are just function prototypes which do nothing except tell the compiler what the function and its parameter types should be. | |
Re: Unlike C++, C language requires the data type on line 27, the symbol app by itself is not a data type. It should be `struct app applist[2];` wait[] is an array of structures, not an array of pointers to structures. So you need to use the . operator instead of … | |
Re: they are both wrong, `int x[]` is often the same as `int* x` void function(int x[]) { } int main() { int x[20]; function(x); int* y = malloc(20*sizeof(int)); function(y); } | |
Re: standard sql DROP TABLE <tablename>. You may have to drop indices first. DROP INDEX index_name | |
Re: please post the code that writes the file. line 18: why is the loop hardcoded with that magic number instead of using the int that was previously read? `for(counter = 0; counter < no_of_readings; counter++)` | |
Re: string has not been defined. You need to include <string> header file. Some compilers do that for you while others do not, so it's best to just get into the habit of always including <string> if you use it. | |
Re: >but i couldnt find a SQL section. It's under Web Development --> Databases. But here is ok too. What database server will you be using? I doubt MS Access can handle that much information to rapidly. Can you consider redesigning the project? For example, the program could hold the data … | |
Re: which version of Borland compiler? You would have to have a 32-bit version in order to access the win32 api functions. Can't do that with Turbo C or Turbo C++. [ Her](http://msdn.microsoft.com/en-us/library/windows/desktop/aa376883(v=vs.85).aspx)e are the functions you will need. | |
Two article titles [here](http://www.daniweb.com/software-development/cpp/8) are still in the list. | |
Re: >There 12 errors that I cant solve it.... Post the errors, we are not mind readers. | |
Re: Is Dragon Nest from Nexon safe to download? Windows 7 tells me its unsafe and won't run the downloaded file. | |
Re: I spend a lot of time at the computer playing Diablo III. That's about the only computer game I really enjoy playing. I play it probably 4-5 hours/day. | |
Re: You need to start learning to organize your programs so that they contain functions that perform specific tasks. For example wrire a function that does nothing more (or less) than adding a node to the linked list. When you get that coded and working correctly move on to write another … | |
Re: line 14: It looks like INPUT_BUFFER is a macro defined to be some number. sizeof(INPUT_BUFFER) in that case will be 4 because sizeof(<any integer>) is 4 on a 32-bit compiler (that may not be true for all compilers, but it is true for all the most common ones). Just remove … | |
Re: Why did you post this in C# forum??? Have you tried googling for how to program robots? ([link](http://www.google.com/#hl=en&biw=1424&bih=741&sclient=psy-ab&q=robot+programming+in+c+ebook&oq=robot+programming+in+c&gs_l=hp.1.1.0j0i30j0i5i30j0i22.0.0.1.365.0.0.0.0.0.0.0.0..0.0.les%3B..0.0...1c..4.psy-ab.82vUfSk2bRc&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.42965579,d.b2I&fp=6aed05e8311ec358)) | |
Re: The difference is that boolean makes more sense to use when all you need is true/false, and boolean probably takes only one byte of memory instead of 4 or bytes for an int. It makes your program a lot easier for us mortal humans to read if you use boolean … |
The End.