15,300 Posted Topics
Re: >>printf evaluation will be done right to left I think you misunderstood the lecturer. | |
Re: >>Contest details will be announced soon. What's the current status of this contest? It's been 7 months and have not heard anything about it, or maybe I just missed it. | |
Re: [QUOTE=stultuske;1749767] well, you must understand, that the machine you would use as a 'server', you can easily place underneath your desk, while the servers you compare them to were bigger than the room you put your desk in :)[/QUOTE] That reminds me of the first computer I saw, was in … | |
Re: Class definitions are normally put in header files, which are included in the *.cpp file. This is done do that the class can be used anywhere within the program, not just main(). Right now you are probably writing very simple programs that contain only a main() function. What would you … | |
Re: Is sizeof(SystemNode) == 8192??? Please post that structure/class. | |
Re: Use a [URL="http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=version+control+software&pbx=1&oq=version+control&aq=1&aqi=g4&aql=&gs_sm=c&gs_upl=1142l7768l0l10159l21l13l3l5l5l1l535l3551l0.4.6.2.0.1l21l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=709f72c2c81dbdf1&biw=1252&bih=570"]version control program[/URL], some are free while others are not. | |
Re: Don't let that turn you off -- you can use whatever variable names you want. If you are talking about the data types, then yes you will just have to learn to deal with them. Although DWORD is just a define for unsigned long int, you should use DWORD because … | |
Re: The reason they teach DOS programming is because its a lot easier to learn then win32 api. New programmers don't yet have the skills needed to program win32 api. Another reason may be the old and ancient compilers/IDEs some schools use, such as Turbo C. They are too old to … | |
Re: Drop both those compilers because they are too old. Get free Code::Blocks (with MinGW compiler) or VC++ 2010 Express. You can easily compile libraries with either of those compilers/IDEs. | |
Re: The links don't work -- most likely because I'm not enrolled at that school, or the links have changed. | |
Re: That works ok for me using vc++ 2010 express. | |
Re: make the vector static. [code] class Players{ public: [color=red]static [/color]vector <strings> info }; [/code] Then in one of the *.cpp files declare it again as if it were a global variable [code] // Players.cpp #include "Players.h" Players::vector<string> info; [/code] | |
Re: I didn't realize there was that option -- I normally just remove the file from the project. | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/cmath/fmod/"]fmod[/URL]() is for doubles | |
Re: The posted program doesn't solve the original question, all it does is demonstrate one way to identify vowels. The OP would have to add quite a bit of code in order to complete the assignment. | |
Re: Read [URL="http://linux.die.net/man/2/waitpid"]this[/URL] for return values | |
Re: Post the code how you got the first part to work. In the second part, create a 2d array of integers and read each integer one at a time using cin's >> operator (that's why I want to see your first code so that I can see how you are … | |
Re: sizeof(any pointer here) is always the size of a pointer, on 32-bit compilers it is 4 (bytes). The sizeof operator returns the number of bytes occupied by whatever object you give it, in this case you give it a pointer. >>Shouldn't the size be 10? or the amount of elements? … | |
Re: Just what do you expect getName() to return in that line? The statement [icode]Sport::getName()[/icode] means that getName() is a static method of the class and [b]name[/b] would also have to be a static member of the class. Probably what you want is [icode]this->getName();[/icode] | |
Re: What version of MS-Windows? | |
Re: [URL="http://lmgtfy.com/?q=nasm+ide"]Read these links[/URL] | |
Re: use a debugger and single step through the program until you find the problem. | |
Re: The button is running in the main thread. MFC doesn't create new threads for individual objects (buttons and windows) but has the same message pump that every MS-Windows has. Which MFC class contains the function you want to run on button click? One way to handle that is in the … | |
Re: libraries with *.a extension were produced with GNU compiler, such as g++ on *nix and MinGW on MS-Windows. They are not usable with Microsoft compilers. | |
Re: Streams must be passed by reference like you did in main.cpp. So change inventory class like this: [icode]void ReadFromFile(ifstream&);[/icode] | |
Re: graphics.h is not part of c or c++ standards, so very few compilers support it. On MS-Windows the only compilers I know about that use it are Turbo C, which is ancient and obsolete. If you want graphics on modern operating systems then you need to learn modern compilers. Turbo … | |
| |
Re: graphics.h is not part of c or c++ standards, so very few compilers support it. On MS-Windows the only compilers I know about that use it are Turbo C, which is ancient and obsolete. If you want graphics on modern operating systems then you need to learn modern compilers. Turbo … | |
Re: Depends on the debugger. What IDE/debugger are you using? If you are using debug.exe (which is no longer distributed with MS-Windows) the I think you are correct. When you use the 'l' command to list memory contents debug.exe just gives you a memory dump without regard to what's in it. … | |
Re: matrix is a 1d matrix, not a 2d matrix. You can keep it as a 1d matrix if you want to but that means you have to calculate the row and column index yourself. This is one of the rare times I could start the i counter with 1 instead … | |
Re: I'm no math whiz but isn't that formula the same as R =1 / (r1 + r2 + ... rn) so first you need the values for r1, r2 .. rn. where do those come from? put them into an array then you can easily calculate the formula (this has … | |
Re: Is this an MFC program, or what? In Windows Forms CloseWindow() only minimizes the window. You want DestroyWindow(). | |
Re: I assume you mean 64-bit processors. The answer is yes because they are still in the x86 family of processors. Intel didn't completly replace the 32 and 16-bit processors, they added to them. 64 and 32 bit processors still use the 16 and 8 bit processor instruction set. | |
Re: Its not as easily accomplished in *nix -- you have to do lots and lots of programming to get that to work in graphics mode. [URL=http://www.opengroup.org/motif/]Motif[/URL] open source package helps a little. Or you might use console-based curses library functions. | |
Re: rohan: you have the right idea, but the code is incorrect. You have to allocate memory for my_strings [code] #include <iostream> #include <cstring> char ** tokenize_urls() { char **my_strings; char *temp[3] = {"first","second","third"}; my_strings = new char*[3]; // allocate memory for the array for(int i = 0; i < 3; … | |
Re: [QUOTE=vegaseat;1559965]Programming without Google? Hard to imagine![/QUOTE] Weren't you around before the internet? Back then we had to read books and compiler documentation :) | |
Re: A lot depends on the program you are writing. Two hints: 1. Using c++ std container classes instead of C-style dynamically allocated objects is the first place to start -- assuming your compiler supports those container classes, not all c++ compilers do. 2. If you are writing Microsoft Windows programs … | |
Re: windows 7: use the mouse to highlight the text, press right mouse button, then select Oopy form the menu. Then open Notepad (or some other program) press right mouse button, then select Paste. Done. That method may not preserve formatting (line feeds and tabs). | |
Re: why do you need that array? they are all consecutive numbers, so you should be able to just calculate the value of freight id based on something else. I have no idea how you can derive freight id from the rest of the data objects in that program. Are you … | |
Re: They are in the libraries, just like the standard C functions. Whether or not you can view the code for those functions depends on the compiler you have. GNU code is free if you download the compiler's source code. The code for other compilers may or may not be free. | |
Re: See [URL="http://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx"]this tutorial[/URL] for C# arrays | |
| |
Re: You can convert the string to time_t format so that later a comparison will be trivial comparison of two integers. First populate a struct tm, then call mktime() which will return time_t, something like this [code] // See previous post char* str = "2011-11-21"; tm tm1 = {0}; sscanf(str,"%4d-%2d-%2d",&tm1.tm_year,&tm1.tm_mon,&tm1.tm_mday); tm1.tm_hour … | |
Re: You could write the higher level programming language in any human language you want. Whatever human language you want to use would have to compile down to whatever assembly language is used on the target computer. That shouldn't be a proglem either unless you want that assembly language instruction set … | |
Re: Look at [URL="http://www.asciitable.com/"]any ascii chart[/URL] and you will see the decimal value of all characters 0-255. >> and three squares covered by each tile indicated by a distinct ASCII character starting with !, I have no idea what that means either. | |
I went to Chester, Illinois (home of Popeye) and took a few photos (only about 150 of them) and posted them on [URL="http://www.facebook.com/?sk=app_2305272732_2392950137"]my Facebook page[/URL]. There's too many to post here at DaniWeb. That town is only about 50 miles from where I live. Next trip will probably be to … | |
Re: You are not allowed to change the datatype of an object -- in this case you can't reassign the data type from triangle* to rectangle*. Just use a different variable name for each one. >>I deleted pointer, aka deallocated the memory. delete operator only deletes the memory assigned to the … | |
Yes, I'm starting a little early. Just finished off a bottle of extra-dry Champagne spiked with brandy. I had glasses for Dani, Narue. and Davy. I hope you liked it cause I sure did :) 31 Dec is also my last day at Wal-Mart. I decided to enjoy life for … |
The End.