15,300 Posted Topics
Re: Maybe [URL="http://www.codeproject.com/KB/list/listviewxp.aspx"]this article [/URL]will give you some hints on how to correct it. Also search that site for "flickering" because I found several other articles on that topic that may or may not be of interest to you. | |
Re: Is this an MFC project? Try adding them at runtime in the OnInitDialog() (CDialog) or OnInitInstance() (CForm) | |
Re: The Shift-Jis format is a Microsoft product. Get a PC running MS-Windows or Macintosh (running KanjiTalk) . I don't know if its possible on *nix. [url]http://www.futureimplications.com/japanese_file_formats/jfilefomats.htm[/url] | |
Re: Do you mean something like [URL="http://www.daniweb.com/forums/forum26.html"]DaniWeb Community Feedback[/URL] ? | |
How to search for something in the Code Snippets boards ??? The "Search In Forums" listbox doesn't include tutorials or code snippets. If I want to find something in C code snippes related to "FILE", the only way to do it is to read each and every post in those … | |
Re: About 1984, just before I retired from military, on their computer and their network. | |
Re: It is not UNICODE -- its just a character from a special font. If you print that out (see below) you will see that it has a decimal value of -105. [code] int main() { char c = '—'; cout << c << " " << (int)c << "\n"; return … | |
Re: If you have a small program with just one *.c file, then static functions aren't all that useful. The advantage of statics is with larger programs whose projects consist of several *.c files. In this case, as Narue already said, make all the functions static that do not need global … | |
Re: Welcome to DaniWeb. But please stop using ALL CAPITALS in the future because they say you are screaming at us. | |
Re: just a few templates you have probably already used vector string fstream ifstream ofstream | |
Re: Whose c++ compiler? Borland? Then you probably need a newer compiler because that one is pretty old and obsolete. You can download free several compilers, such as VC++ 2008 Express, Dev-C++ and Code::Blocks. Just google and you will find the links. | |
| |
Re: use nested loops [code] for(int year = 1; year < 2; year++) { for(int month = 1; month <= 12; month++) { // blabla } } [/code] | |
Re: why don't you spend $50.00 and go ask a lawyer that specializes in such things. | |
Re: You will get quickest and best answers by posting on Maya's message boards. | |
Re: You will have to catch the WM_CLOSE event. Sorry, but I don't recall exactly which event handler you need to put that in. | |
Re: Move lines 19-25 down within the loop to line 36 and it should work. lines 47-99: You don't need to do that at all -- just save the sign in a char array so that they can be printed later at the end of the program. Since sign is a … | |
Re: I would think it would be a lot easier to work the the digits as strings instead of integers. [URL="http://en.wikipedia.org/wiki/Palindromic_number"]For any given number:[/URL] 1) Is it a single digit -- yes, then its a Palindromic number 2) If two digit number, are both digits the same: -- yes, then its … | |
Re: which version of the compiler are you using? Did you first create a project in which you can add the *.cpp and *.h files? I think Microsoft has a tutorial that will teach you how to use the compiler. If you have VC++ 2008 Express just read [URL="http://www.microsoft.com/express/vc/"]the links here[/URL] | |
Re: [QUOTE=MidiMagic;743048]I can't log in using Firefox. When I click on the Member Login button, nothing happens. The windows for username and password do not appear. .[/QUOTE] I am now in FF version 3.03, logged out. When I hit the Login button at first I though it did nothing, but then … | |
Re: lines 13 and 14: the size of the vectors is 0 because you have not assigned any elements to the vectors. Therefore the loop starting on line 17 will never execute because both s and decksize are 0. similar lines 31 and 32 cause program to crash because deck does … | |
Re: >>P.S 1: I'm only a beginner Then you are way way over your head. Learn the language before jumping into the deep water. >>just tell me where can I put it Do you really mean that :) | |
Re: Here are the data types in C -- the actual size of the data is not specified by the language because it may be different on each platform. You have to look in limits.h header file to find out the minimum and maximum values that any given data type can … | |
Re: The answer to the first question is easy [code] #include <iostream> #include <iomanip> using namespace std; int main() { cout << right << setw(20) << "Hello\n"; } [/code] For the second question, there is no portable way to do that. Some compilers pre-define macros that indicate the compiler and compiler's … | |
Re: [QUOTE=debasisdas;432803]No need to re invent the wheel this feature is inbuilt to VB 6.0. Just add an About Dialog from the Add form option .It comes woth a OK button. it comes with all the code. Just try once.[/QUOTE] That isn't what the OP wants -- he wants to know … | |
Re: >> can any one help? Yes -- but I can't see what you have attempted so you will just have to post your code here. >>the input should not be case sensetive Convert the input string to all upper or lower case. You can use the toupper() and tolower() macros … | |
Re: displayGrid() is called from playGame(), but playGame() is not called from anywhere. | |
Re: Look at the parameter for State_Tax() -- it is not a pointer. But you are trying to pass a pointer in Calculate_Taxes(). Change it to this: [icode] *statetax = State_Tax(*federaltax);[/icode] | |
Re: why should it return anything? just make the function void. | |
I've had enough of it because every little thing that happens I loose the sound. So tonight I got rid of it and went back to XP Pro. Glad I had duel booted the two operating systems because it was very easy to get rid of the duel boot option. … | |
Re: >>can i read the contents of the table into a structure I don't know -- can you ? >>will i be able to print these contents in desired form Here again, I don't know if you can or not. Only you can tell us that. And why should we care … | |
Re: argv is an array of strings, not ints. You have to convert strings to ints before adding them [icode]answer += atoi(argv[k]);[/icode] Other ways to accomplish it is to call [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/strtod.html"]strtod[/URL]() or [URL="http://www.cplusplus.com/reference/iostream/stringstream/"]stringstream[/URL] | |
Re: >>char* sntnc; That is just an unallocated pointer. If you want to use pointers then you have to allocate memory for it. [icode]char* sntnc = new char[255];[/icode] For the purpose of your program a better way is not to use a pointer [icode]char sntnc[255];[/icode] Or even better yet, use std::string … | |
Anyone know why my sound keeds getting set to mute? It gets set to mute every once in awhile, I don't know why. Also, on related question, I have a set of Bose ear phones, the kind you stick in each ear (see thumbnail). The problem is that sound comes … | |
Re: try it, time it, and find out if it will make any noticeable difference. | |
Re: 1) The case statements need at break; statement at the end of the case to prevent other cases from being executed [code] case 1: ... break; case 2: ... break; // etc [/code] 2) You don't need to check the value of Deck[i] within the case statements because that is … | |
Re: There are thousands of tutorials, most of them are not worth the band width. Read about the books in the [b]Read Me[/b] thread at the top of this c++ board and you will get lots of excellent suggestions. | |
Re: Try commenting out the worker threads and see if that fixes the problem. If not, then you know something else is wrong. If the problem goes away then try uncommenting worker threads one at a time until the program is broke again. | |
Re: All I see in the code you posted is the function prototype for that function -- where in *.cpp or *.h file is the implementation code? | |
Re: >> Is there any way to do this? check the user input string to see if it contains a path -- e.g. the '' or '/' character (path separators can be either character in MS-Windows os). Copy that part in another string so that you can use it whanever needed. | |
Re: member function readfile() only reads one record into the stucent structure. There should be a loop somewhere else in your program that puts that in a loop to read the entire file into an array of student records. as for part b) -- You could have read() function return TRUE … | |
Re: getline() doesn't work like that. What you want is this: [code] while( in >> lat >> lon >> R) { // do something with that data } [/code] Now, if you want to keep all the data in memory at the same time, create a structure and then a vector … | |
Re: idots sure can -- see [URL="http://www.daniweb.com/forums/thread161559.html"]this thread[/URL] I just posted | |
Re: you need to put getline() in a loop inside the function lookyLooky() so that it reads all the lines in the file. Then on each loop iteration use the std::string's find() method to search for the desired text. [code] while( getline(filename, line) ) { // check to see if this … | |
Re: I would first create a structure [code] struct words { std::string word; int count; }; [/code] Next an vector (array) of those structures [code] vector<words> wordArray; [/code] Now, then the program reads a line, check wordArray if its already in the array. if it is then increment the count. If … | |
Re: >>What makes a good prgoammers? Practice, practice and more practice. And a good deal of patience. >>What made you get a job? I don't like starving :) | |
Re: call srand() only once during the lifetime of the program -- normally called near the beginning of main(). | |
Re: What do you think is the answer? Did you compile and test it for yourself? If not, why not? |
The End.