15,300 Posted Topics
Re: Did you compile the SFML libraries yourself from source or download one of the binaries? I went to their site and did not see a binary version that was built with vc++ 2010. | |
Re: If your program can already read random memory locations then what's the problem? You have to know the address before you can read it. Just be aware that any given address in your program's memory is a virtual address, not a real RAM memory address. A program can not normally … | |
Re: >> searchFor = "*my\*day.*"; That will not compile -- if you want a \ in the string then you have to put two of them, so the code should be [icode] searchFor = "*my\\*day.*";[/icode] Otherwise the program appears to work ok for the tests I made. Now I think you … | |
Re: And for god's sake format your code so that we can read it! No one is going to read all that unformatted crap. | |
Re: Those are debug version of the libraries. Recompile your program for release version and it may work on other computers. computers. | |
Re: setw() tells cout the minimum width of a column. When the actual text is longer than that cout will just ignore the setw() value. So make the columns wide enough to hold the longest line plus a few spaces for best looking product. Also use left to left-justify the text … | |
Re: After the while loop that starts on line 8 of the code you posted you need to add another while loop that searches for the next non-space character so that the function skips all spaces between words. | |
Re: If DaniWeb is unavailable then how would it generate an email??? The admins probably already know about the problem so generating hundreds of emails to them would do nothing more than fill up their email box. | |
Re: Not possible. The programmer can create it either on the stack or on the heap -- the choice is up to him/her. The object has no idea where it is in memory. | |
Re: >>do there profane programming Its [b]their[/b] not there. :) And yes, we were all beginners at one time or another. ![]() | |
Re: why does RoboExtract.h include itself? See the 4th line of RoboExtract.h that you posted. | |
Re: [URL="http://www.codeproject.com/KB/system/Sendkey.aspx"]Here [/URL]is an article that explains how to do it. | |
Re: string literals such as in your second code can not be changed because the compiler probably puts string literals in read-only memory. The first example is making a copy of the string literal which the compiler places in read/write memory, so there is no restriction on writing to that memory … | |
Re: Look for books on Windows Programming at amazon.com or your local Barns & Noble. Its unlikely you will find anything that describes everything that windows.h has to offer. But you will find quite a few books about how to write windows gui programs using pure win32 api, MFC, Forms, C#, … | |
Re: If isalpha() failes it does not mean that the character is a numeric digit, it could be anything else too. If you want to check for numeric digits then use isdigit(). And both only check one character, so if you have a whole string then you must check each character … | |
Re: you can use [URL="http://msdn2.microsoft.com/en-us/library/96ayss4b(VS.71).aspx"]popen[/URL] to create a pipe between your program and the other executable. Output of that other program will can be read by your program via the pipe. ![]() | |
Re: It would be helpful if you posted the code you wrote. | |
Re: #2 depends on the compiler and operating system. The size of an int in a 32-it program may not be the same as in a 16 or 64-bit program. | |
Re: Post your code here instead of posting a link on some other computer -- which would not respond when I tried to read it. Just simply copy and paste the code in your post and surround it with [noparse][code] ... [/code][/noparse] code tags. | |
Re: >> if(search[ctr] == array[8][ctr]) lines 14 and 23: you are using the wrong index (8) into [b]array[/b]. Valid index numbers are 0, 1. 2, ... 7. The number 8 is beyond the bounds of the array. line 16: add [b]break[/b] to stop the loop | |
Re: What makes you believe that rand() only produces one random value per second? Have you profiled it? What is the speed of your computer? A computer with a faster CPU will process code faster. I wrote a little program that generated 1,000,000 randm numbers on 43 millisonds and if I … | |
| |
I knew there was something fake about that woman. She's an actress, not a politician. [quote] [b]On Palin from a fellow Alaskan.[/b] Like many Alaskans, I resent Palin’s claims that she speaks for all of us, and cringe when she tosses off her stump speech line, “Well, up in Alaska, … | |
Re: is it a programming problem? Yes, then what language ? First, go [URL="http://www.daniweb.com/forums/forum2.html"]here[/URL] and select the language of your choice. Let's say you want c++. When you click the c++ link you will see [URL="http://www.daniweb.com/forums/forum2.html"]this page[/URL]. See the yellow button near the top called [b]Start New Thread[/b]? Just click it … | |
Re: The reason the two expressions are different is because in the first one the value of num can be anything other than 64 in order to satisfy the expression. But in the second expression the only value of num that satisfies the expression is 65 because 65-65 is the only … | |
Re: you have a couple of choices (1) call fgets() to read each line into memory then search the line for spaces (2) call fgetc() to read the file one character at a time then check for spaces. | |
Re: [QUOTE=Mix;254478]Dont hurt yourself with Windows firewall it's too broken get ZoneAlarm and AVG, dump Norton completely. If you need help doing it get at me.[/QUOTE] Oh! great!:rolleyes: Now you all tell me that after I just bought Norton Internet Security suit. | |
Re: CS is just a general category, very similar to the term "Business Administration". The books you will want to read will depend on your interests. Go to a local book store such as Bsrns & Noble and you will find hundreds of books in the CS field. >>I am too … | |
Re: Now that you posted the code that works, post the code that doesn't work and also a few of the compiler errors. | |
Re: Depends on the file and its contents. CFile is not a good choice for reading strings (standard text files) unless you also want to use CArchive and CString. If you don't have to serialize MFC classes then I would use standard c++ fstream | |
Re: EN_UPDATE is posted when the control is in the process of repainting itself so that you can resize the control or take some other actions. This means EN_UPDATE may be posted for for events other than keyboard, such as when the window becomes in focus. EN_CHANGE is sent when the … | |
Re: compile that program for debug then use your compiler's debugger to step through the program one line at a time until you find out where the error occurs. One of the most common errors to look for is buffer overruns and using uninitialized variables. | |
Re: You can freely advertise at one of [URL="http://www.daniweb.com/forums/forum36.html"]these DaniWeb links[/URL] | |
Re: Congratulations -- you just answered a four-year-old long dead thread. | |
Re: >>Anyway, once you click into the post itself the views are then shown. Where?? I don't see it in this thread. Oh nevermind, I found it. | |
Re: before reformatting the hard drive and starting all over again try getting a spyware program from the net and see what it finds. Its probably not a virus but may be spyware or some keylogger. | |
Re: The code you posted makes no sense all with the error messages. Post the code that correspoinds to the error messages. | |
Re: >>i know for a fact that cmd.argv(1) at that point is "vars.rc" But is that file in the program's current working directory? Try running your program with the full path to the file and see if that works, or move the file into the program's current working directory. >>if(cmd.argc() != … | |
Re: There are lots of ways to do it -- which one you use will depend on the data you want. std::string is a c++ class that manages chracter arrays and expands/contracts it on demand. vector, list, set, and map manage arrays or lists of objects, and also expand/contract on demand. … | |
Re: I spent most of the day working -- at WalMart. But I did have a couple flags flying outside my house. | |
Re: You can use the registry functions for *.ini files. [URL="http://msdn.microsoft.com/en-us/library/ms724875(v=VS.85).aspx"]See this link[/URL], then scroll down the page until you find GetPrivateProfileInt() and etc. Or you could just write your own functions to read/write/update the *.ini file. Since *ini files are just text files you will have to rewrite the entire … | |
Re: use global variables. You will have to synchronize access to the variables so that one thread doesn't try to read it while another thread is writing to it. If you are writing a MS-Windows GUI program then you might be able to call SendThreadMessage(). | |
Re: >>Need a link back to the forum list Unless I misunderstood, there already is a link back to the forum list near the top of the page. | |
Re: First define the structure you want to store in the file (database). Then begin writing the code to prompt for the information needed to fill in one structure member. When that is filled in save it to the file. Myself, I would use binary files because they are easier to … | |
Re: Redraw them in the same color as the background. Or I suppose you could save a bitmap of the entire screen before you start drawing the rectangles and redraw the screen with that bipmap when you want to clear it. | |
How can I use code tags that do not produce line numbers? I used to use quote tags, but that is just almost unusable now since the quoted text is hidden. So to preserve the spacing I use code tags, but I don't like the line numbers. Also, where's the … ![]() | |
Re: [QUOTE=Thon;487095]Thank you for that information. My generation hoarded clock cycles like misers. I've just come back to coding after a long absence and I'm horrified at what looks like sheer carelesness and bloat. It looks like 3 megabytes is the new 16k.[/QUOTE] I'm that way too -- I was agast … | |
Re: What have YOU done to solve the problem? You will need to post the code you have written and ask specific questions about what you do not understand. |
The End.