15,300 Posted Topics
Re: Is your computer running antivirus program ? Is it up-to-date? Check here to see if there is a program that will start on bootup: C:\Documents and Settings\All Users\Start Menu\Programs\Startup Also similar directory, but with your user name instead of "All Users". | |
Re: >>Can someone help me out with this .. in C++?? Help? yes. c++ no. fopen() is a C function, not C++; [code] char *filenames[] = {"file1","file2","file3",NULL}; for(int i = 0; filenames[i] != NULL; i++) { FILE* fp = fopen(filenames[i], "r"); // do something // now close the file fclose(fp); } … | |
Re: you mean you want the program to read a *.c or *.cpp file then print all the function names ? Start out with a very simple program that just opens the file and prints out each line. Post your code for that much and then we can talk about the … | |
Re: use setw() to force column width. [icode]cout << setw(2) << 12 << setw(6) << "Hello";[/icode] | |
Re: I wish I'd known about that Usability Studies link when I bought Vista os because I would have like to have given M$ a piece of my mind about that stupid packaging too. It took awhile for me to figure out how to open the damed thing too. Its terrible. | |
How can we use our member certificate on other web sites so that it is displayed on every post I make? For example, I thought I might be able to put it in my signature, but that doesn't work, and avatar doesn't work either. Any other way I can do … | |
Re: I listen to talk radio when I'm in the car, otherwise I don't listen to it. If the station is talking sports then I turn it off and listen to CDs while driving. | |
Re: >> I need to access but can't because it is declared as private... In MyClassB write a get() function that returns the value of the private variable, and you can also write a put() variable that lets you change it. >>Could anyone also explain what & does? Depends on the … | |
Please vote for your favorite avatar -- Too bad polls can't include graphics. I would have like to add more names, but max of 10 allowed, so if your favorite is not listed here just check Other and post the name you want. And you can vote for more than … | |
Re: I don't know what your question is, or even if you have one. But this line is wrong: >>#include <iostream.h> Current c++ standards do not use the .h extension. So if you use a modern compiler than code it like this: [icode]#include <iostream>[/icode] | |
Re: >>i get the same box repeating itself twice It only appears to be the same box because you have the same identical text in each one. Change the text in one of the boxes and you should see the difference. You can't show them both at the same time. Message … | |
Re: [b]Must goverment be the center of our existence?[/b] Yes, it is. Without government there would be just chaos. Government, from the tiny village to the federal government affects our every day lives. I can't think of a thing I do (yes, even in the privacy of my bedroom and bathroom) … | |
Re: why don't you ask your "friend" how to compile it, afterall he wrote it. | |
Re: >>My question is do softwares developed in VB 6.0 work on win vista or not? Maybe yes, and maybe no. It depends on the software. >>Do vista come with the visual basic runtime library I don't know. Tell me the dll name(s) and I'll look to see if its on … | |
Re: [QUOTE=needs_help;295493]What is a good language that can easily make applications, has the ability to read mouse clicks on certain places, can make highly detailed pictures, is just as mathematicaly abled as dev-pascal, and can easily make a program using Artificial Inteligence, a new compiler, or a user interface?[/QUOTE] :mrgreen: Is … | |
Re: You have a couple options 1) store it in [URL="http://msdn.microsoft.com/en-us/library/ms724875(VS.85).aspx"]the registry[/URL]. This isn't very difficult to do and you should be abot to find pleanty of examples on the net via google. 2) store it in a normal data file | |
Re: Welcome to DaniWeb, hope you enjoy your stay. The first computer I ever saw was in a [URL="http://www.computermuseum.li/Testpage/IBM-SAGE-computer.htm"]SAGE building [/URL]in McChord AFB, Tachoma WA in 1963 -- one computer occupied three stories of that building. But I'm sure you know about those monsters :) I wasn't into computers in those … | |
Re: >>I can change the result of the memory location that the pointer points to, but not the string that begins at that address. Those strings can not be changed because they string literals which reside in read-only memory. | |
[url]http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=39199906[/url] | |
Re: >>I can't find my hardware.dat file on the compute It will be in the same directory that contains the program *.exe file. >>the write in the updateRecord() function does not work. what makes you think it doesn't work? What does it do that it's not supposed to do, or what … | |
Re: Click on the Welcome Guide at the top of every page and you will get a tutorial. | |
Re: you are doing too much work! [code] int main() { char name[10] = {0}; strncpy(name,"How Now Brown Cow", sizeof(name)); name[sizeof(name)-1] = 0; cout << name << "\n"; } [/code] | |
Re: that loop is constructed incorrectly [code] while( getline(infile, line) ) { cout << line << "\n"; } [/code] >>give. I imagine we have to put a counter/loop inside the file so it can differentiate between the name's and All you have to do is put the name on the same … | |
Re: 1) I'm not sure either, but probably the limit of an integer. See limits.h for that value. 2) you don't need to use clear() at all. getline() will do that for you unless it fails, such as at end-of-file. And you don't need to use clear() on sstrm either because … | |
Re: Agree with what others have said. It might be easier to learn C before tackling c++. If you know fundamentals of C then C++ will be a snap. And if you know C++ C# and Java will also seem quite easy to learn. | |
Re: The simplest, but slowest, way is to do a linear search -- start from the beginning of the file, read each record until you get the one you want. For files written in text mode there isn't much more that can be done to speed up the searches. A more … | |
Re: And what is the problem with that message? If you want 52 seconds you will be ok, right? | |
Re: Look at your function getData(). It isn't reading the data from the file -- all it is reading is two numbers called low and high. What its supposed to do is read all the numbers into the array [b]temp[/b]. You will have to add a loop so that it can … | |
Re: >>I'm parsing this WaveFront .obj file WaveFront .obj is NOT a text file so it doesn't contain lines, all it contains is a bunch of binary data. You can't treat binary files as if they are text files. line 1 thru 3: remove the trailing \ character -- c language … | |
Re: This works for me [code] #include <vector> #include <string> using namespace std; typedef std::vector<string> String1D; typedef std::vector<String1D> String2D; typedef std::vector<String2D> String3D; int main() { String3D vector1; String3D::iterator OneDStart = vector1.begin(); String3D::iterator OneDEnd = vector1.end(); for ( ; OneDStart != OneDEnd; OneDStart++ ) { //1D String2D::iterator TwoDStart = OneDStart->begin(); String2D::iterator TwoDEnd … | |
Re: >>Hacking = Writing? Only in VB. In C and C++ its [icode]Hacking == Writing?[/icode] | |
Re: looks like you are attempting to use GNU library non-standard time functions. [URL="http://www.gnu.org/software/libtool/manual/libc/Elapsed-Time.html"] See this article how to use it[/URL]. | |
Re: >>::ZeroMemory(buf, 256); Since you declared buf as TCHAR you need to use the sizeof operator, like this: [icode]::ZeroMemory(buf, sizeof(buf));[/icode] >>strlen(buf) Can't use strlen() in TCHAR because it won't work when compiled for UNICODE. Use the macro _tsclen() instead, which will get correctly converted to either strlen() or wsclen(), depending on … | |
Re: 1) The while statement is incorrect [code] while( inData>>lastname>>firstname>>identity[number] ) { // other code here } [/code] 2) you don't want that i loop because it is attempting to read (rows*cols) number of numbers for each name. All you want it to do is read the columns for each name. … | |
Re: depends on whether its a string or numeric value. If you code it to always enter data as strings then you can easily test for empty string, then convert the string to some numeric value if needed. | |
Re: >>How can I get daily classes for C? At your local university, but if you didn't know the answer to that question then I question your ability to become a programmer! | |
Re: [QUOTE=joshmo;659697]Secondly, you do not need to pass the file stream through a function. if it has already been declared in main then you just have to use it the same way you use your cin statements. [/QUOTE] If the stream is declared in main(), how do you expect to use … | |
Re: 1) Depends on the compiler and whether you compile the program for debug or release. Most modern compiler will make them the same code, despite the errors in the code snippets you posted. 2) Speed has nothing to do with it -- the { and } are there to block … | |
Re: [QUOTE=coveredinflies;657198]Incidently when you get stuck on little problems like this and can't figure them out where do you look for help?[/QUOTE] DaniWeb :) | |
Re: If running MS-Windows check Task Manager to see CPU time in use -- if its approaching 90% then you have too many threads. | |
Re: The compiler adds code to the program to call the constructor. [edit]^^^ What Jerry said too. [/edit] | |
Re: See [URL="http://msdn.microsoft.com/en-us/library/aa363196(VS.85).aspx"]Communications Resources[/URL] in MSDN for explaination how to do that on MS-Windows. What you might want to do is set up a callback function that windows will call when incomming data is available at the comm port. | |
Re: I used VC++ 2008 Express and had a couple errors. There are two functions that are supposed to return values but don't. You have to correct that problem before attempting to run the program. error C4716: 'getWeaponSelection' : must return a value error C4716: 'fileHighScore' : must return a value … | |
Re: line 10: that is a function prototype and should appear outside any function, such as on line 6. And the parameters in the function prototype on line 10 doesn't match the parameters in the actual function on line 35. The two must match exactly. | |
Re: [QUOTE=niek_e;653071]I like VS2008 (VC++ Express) the best. ... and it's backwards-compatible with VC6. [/QUOTE] No it isn't backward compatible because VC++ 6.0 did not support the c++ standards very well. Code written with VC++ 6.0 will encounter some porting problems when compiled with VC++ 2005 or newer compilers. Don't bother … | |
Re: you could have subclass3 be derived from both subclass1 and subclass2 [code] class subclass3 : public subclass1, subclass2 { // blabla }; [/code] | |
Re: [URL="http://www.codecodex.com/wiki/index.php?title=Calculate_an_integer_square_root"]have you ever heard of google[/URL] ? ![]() | |
Re: There are legatimate uses for such software, for example at help desks there the helper can see that the client is doing so that the helper can help the client. We had software something like that at my last job. I think it was commercial program, possibly Norton PC Anywhere … |
The End.