No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- C++
8 Posted Topics
Re: There is a best techinque to receive the data: [code=cpp] int size_to_recv = 100; while(size_to_recv) { int r = recv(sock, buf, size_to_recv, 0); if(r <= 0) break; //socket closed or an error occurred size_to_recv -= r; } [/code] The main reason for this while loop is that 'r' may be … | |
Re: Oh, there's too much code... Could you please tell the exact error place? Why can't you use Calculate() function? What does exactly happen if you try? | |
Re: Perhaps you mean [icode]string [b]*[/b]names=new string[30];[/icode], right? (note the '*' character before the variable name). It is possible to make it [icode]std::vector<string>[/icode] and use the internal finding algorithms of STL. | |
Re: Try to hide the listview control from the window, sort, and then show the listview back again. Windows does not bother repainting hidden controls. Is the sorting now faster? If yes, then it is true that the repainting is slow. If no, then it is your sorting itself is slow, … | |
Re: Somebody recommends to use libraries like Qt to be involved into GUI programming easily. But that's not quite good decision while you want to really understand the whole process of how graphic apps on Windows are implemented under the hood. Once you understand the things in the native Windows API, … | |
Re: Split your algorithm into pieces: 1. get the user input char by char 2. convert it into integer (however it is much easier to get the whole number at once ("cin >>integer"), but I guess it is required in the task to grab the input by 1 char) 3. get … | |
Re: Should be [code=cpp] ... x = 0; ifstream tofile("answers.txt"); while( x < 255 && fromfile.getline(question[x], 255) ) ... [/code] Also, it is not quite good turn to call fromfile.getline() when you have closed it with fromfile.close() on line 35. I think it will be better to reproject your code from … | |
Re: Please don't post too much code - it is difficult for people to understand it at a glance, split it by parts and ask the questions to each part of the code. Usually to override global operator+() function a programmer does something like [code=cpp] Type operator+(const Type &t, const Type … |
The End.