15,300 Posted Topics
| |
Re: Do you know SQL (Structured Query Language)? If not, then you need to read a tutorial -- there are lots of free tutorials, just google for them. If you already know SQL, then use CREATE DATABASE sql command. [ Here ](http://www.rhyous.com/2010/05/28/how-to-query-a-database-in-csharp/)is a basic outline of how to do that. | |
Re: Make sure the coordinates you pass are SCREEN coordinates, not Window coordinates. In full screen mode the two are the same, but not in windowed mode. | |
Re: > StarDock is offering a new (reasonably priced) utility called ModernMix which will allow you to run all of the Metro (full screen) apps in windows just like regular desktop apps Doesn't Windows 8 do that now? | |
Re: [QUOTE=benshums;501526] | Can anyone tell me what \-> comment does? Does it simply include the library during compile-time? Thanks.[/QUOTE] read [URL="http://msdn2.microsoft.com/en-us/library/7f0aews7(VS.71).aspx"]this[/URL] | |
Re: Start by googling for "c++ antivirus" and reading the links, sometimes google helps and sometimes not, but you won't know until you do it. | |
Re: I think you mean you want to know how to create a date class. Do you know how to create a class of any type? The three items you listed could be methods of the class. The data objects of a date class would contain day, month and year integers, … | |
Re: Why are you using ofstream in a CLR/C++ .NET program? CLR/C++ is a MANAGED program and ofstream is UNMANAGED. The two are not compatible. You should be using [System.IO.file streams](http://msdn.microsoft.com/en-us/library/system.io.file_methods.aspx). | |
Re: Probably about a 4 hours or so. I'm not on DaniWeb now as much as I used to be -- too busy playing Diablo III. | |
Re: It moves the file pointer 4 bytes towards the beginning of the file from the current position. | |
Re: In the header file, try putting code gards around it like this: #ifmdef MYHEADERFILE #define MYHEDERFILE // your code goes here #endif | |
![]() | Re: free() does not change the pointer, it still points to the now-freed strings. Try this for(index=0;index<50;index++) { free(report[index].name); report[index].name = NULL; report[index].score=0; } Also note that NULL refers to pointers, not integers. If you want to initialize an integer to 0 then do that instead of using NULL. Some compilers … ![]() |
Re: Nice photos :) What country is it in? | |
Re: You might try [Sane's Monthly Algorithms Challenges](http://www.programmingforums.org/forum64.html) written for beginners through advanced programmers. Warning! Warning! requires some thinking. | |
Re: The one word I really really hate is banned here -- the F word. I know people who can't say a sentence without saying it and it drives me up the wall. My mother would have washed my mouth out with soap if she herd me saying that word, and … | |
| |
Re: >So when my program is launched the global class does not have the data to use Then I suspect you need to reorginze the logic of your program. Function foo() can't do it's job if the data doesn't exist yet. | |
Re: What compiler and operating system are you using? The code's formatting is the most horrible that I've seen posted here in the past 10 years! Format it properly and someone might actually try to help you. | |
Re: The function is being called. I used VS 2012 to verify that. What did you enter for the filename? Why do you think that function is not being called? The program seems to freeze probably because there is an infinite loop. Use your compiler's debugger so that you can see … | |
Re: >my original hard coding produced poor performance. You're not going to get any better performance either. If you want good performance then use a game engine that is designed for that, such as DirectX or OpenGL (there are probably many others too). | |
Re: According to [this wiki](http://en.wikipedia.org/wiki/Masqualero) article it was the name of a band from Norwy (1983-1991) | |
Re: Yup, Microsoft has phased out debug.exe because Windows 7 no longer supports those ancient 16-bit programs. You can download [URL="http://sourceforge.net/projects/dosbox/"]DosBox[/URL] and run the 16-bit programs and debug.exe from there. | |
Re: why does line 8 exist??? You probably need to delete that line. And line 11 is missing open brace { line 42: need to add a return value, e.g. "return 0" | |
Re: what part of that don't you understand? What do you need help doing? | |
![]() | Re: I should think the best way is to have everyone log in when they start the program. If you do that then you can easily expand on your idea to associate certain buttons and stuff by user and/or password. If the user does not have permissions to press a certain … |
![]() | Re: Is that a compile-time or run-time error? Did the program include windows.h? What compiler are you using? |
Re: Great games use great game engines such as OpenGL or DirectX. Those do all the really hard work and let you concentrate your efforts on the game, sound and graphics. Yes, you have to be an expert on all those fields. You can't possibly code a good game without being … | |
Re: Many games that run on XP will not run on Win7. So if you are a big gammer and like the games you are playing, then stick with XP. | |
Re: Depends on the compiler you are using. If you are using Turbo C++ then you can't code the using namespace std: option because that compiler doesn't understand it. You have to use fstream.h with that compiler. If, on the otherhand, you are using one of the modern c++ compilers then … | |
Re: My first real computer was a Zenith 100 with 16K ram and two 5 1/4" floppy drives, no hard drive, MS-DOS 1 operating system (folders were not supported then). We had a very fast 300 baud modem that took about 1 1/2 hours to send a 2k text file from … | |
Re: Looks like it should work. Except you only need "%d" instead of "%03d" because internally integers don't have leading 0's like you see them printed out. If you want to print out the number then use "%03d" | |
I accidentally added a comment to Up vote before discovering that it should have been aa comment to Flag Bad Post comment. Now I can't delete the comment. Can you do that for me? | |
Re: I doubt you will ever find a perfect word list -- afterall even Websters dictionary contains foreign words, acronyms, abbreviations etc. Then there's the issue of whose version of English do you want to use? Oxford English, The Queen's English, American English, etc. Then what will you do with all … | |
Re: All you have to do is call time() function (see time.h) to get current computer system time and date. Then you could have the data stored in files with the filename of the date it was written (you would want to include time if time of day is important). For … | |
Re: is that in a loop of some sort? If it is, then just break out of the loop. How to detect a key press is a different matter. There is no standard C way to detect the press of a single key because standard c functions always require you to … | |
Re: when you type ./rev < numbers you are redirecting the contents of numbers into rev program. That is not what rev is expecting. Leave out the < symbol, just `./rev numbers` (assuming numbers if the name of a text file) >Also I can't read a file one per line, and … | |
Re: Why did you put all those pointers into the structure? You could have saved yourself a great deal of trouble by not using pointers in the structure. Each structure instance should hold the data for only one ebook. Then you can have an array of structures. For example: struct ebook … | |
Re: >American Football is like "Let's play a rough game, but we don't want to get hurt"... pansies. I'd say American men want to be able to produce babies after a football game :) ![]() | |
Re: re-read Stop 1 carefully, your reverse() function does not meet the stated specification. >The function should take an open input file stream That means the function referse() should have this prototype: `void reverse(ifstream& infile);` Next: Unless you were told otherwise by your teacher you should use std::string instead of charcter … | |
Re: why are you using stringstre3am? It's like hitting a nail with a slughammer. What is variable n for? Just use the loop counter i. if( line[i] == ' ') { break; } else { } that will give you only the first word in the line. What are you going … | |
Re: > i wrote "cout << "Item Cost: " << setw(8) << cost << setw(10) << setfill('=') << endl;" and the result is "Change Due: ======5" Impossible. If you write "item cost" how is that changed to "change due" ?? I think you misquoted something. It's best if you just copy … | |
Re: Depends on the game. But if it is a game you bought that is on DVD then you probably have no choice other than to use the game's installation program. If it's a game you wrote then how you do it is up to you. Most games nowdays that are … | |
Re: UNICODE only affects character strings, not bitmaps. For example, you need to convert the string literal "Hello World" by enclosing it in a macro _T("Hello World") (defined in tchar.h). You could also do it by putting capital L in front, such as `L"Hello World"`. Using the _T or _TEXT macro … | |
Re: Standard out (STDOUT) and standard in (STDIN) are old C-language terms meaning the STDOUT = the terminal (screen) and STDIN meaning the keyboard. Most (but not all) operating systems allow you to redirect STDOUT and STDIN to/from a text file so that the data can be easily writen to a … | |
Re: diet Pepsi. It's not good for your butt to be sitting for long hours stuffing your mouth with junk food. | |
Re: You mean more electricity to run the computer? No. You can only install a finite amount of ram in any computer. If you are running so many programs that you fill up all the ram then you have lots of other problems too. | |
Re: One problem is the loop on line 19. The first element of all arrays is numbered 0, not 1. So the loop should be like this: `for (count = 0; count < numMonth; count++) //Fill the array with values.` line 26 does not call a function, it is just declaring … | |
|
The End.