Forum: C++ Oct 12th, 2009 |
| Replies: 3 Views: 210 Maybe a file2.clear() would be helpful because upon completion of the first loop the eof bit remains set. |
Forum: C++ Sep 23rd, 2009 |
| Replies: 2 Views: 177 It seems that the compiler you are using, does not know "#pragma comment". Because it is only a comment, just remove these statements from the source code. |
Forum: C++ Sep 23rd, 2009 |
| Replies: 8 Views: 243 Or maybe you have a const method and you try to decrement a member variable in this method. |
Forum: C++ Sep 21st, 2009 |
| Replies: 10 Views: 405 No, he is using managed C++.NET and the .NET String!!! |
Forum: C++ Sep 7th, 2009 |
| Replies: 2 Views: 218 And use a std::map<std::string, int> to count the occurences of the words in the file:
- if you cannot find the word in the map, then create a new map entry for that word with the int set to 1
- if... |
Forum: C++ Sep 4th, 2009 |
| Replies: 3 Views: 277 Maybe this works for normal years, but not for leap years. |
Forum: C++ Sep 4th, 2009 |
| Replies: 4 Views: 304 Do you have RichEdit Controls in your dialog? If yes, did you add a call to AfxInitRichEdit() to CYourApp::InitInstance()? |
Forum: C++ Sep 2nd, 2009 |
| Replies: 3 Views: 378 This is Windows code, not Linux. |
Forum: C++ Aug 31st, 2009 |
| Replies: 2 Views: 167 maybeb you should start with something like:
std::string createString(int i)
{
// create the string of "level i"
}
for (int i = 1; i <= 5; ++i)
{ |
Forum: C++ Aug 31st, 2009 |
| Replies: 5 Views: 164 WinMain() -> http://msdn.microsoft.com/en-us/library/ms633559%28VS.85%29.aspx
p.s. and please.... you have 101 posts and should be able to give your request a meaningful title! |
Forum: C++ Aug 31st, 2009 |
| Replies: 2 Views: 162 I personally prefer this one:
http://www.amazon.com/Programming-Principles-Practice-Using-C/dp/0321543726/ref=sr_1_1?ie=UTF8&s=books&qid=1251713747&sr=1-1 |
Forum: C++ Aug 31st, 2009 |
| Replies: 3 Views: 279 You could possibly handle the WM_KILLFOCUS (or EN_KILLFOCUS or whatever) event of editbox1. |
Forum: C++ Aug 28th, 2009 |
| Replies: 2 Views: 252 What is the second list in
typedef std::list<list*> List;
or do you mean
typedef std::list<std::list*> List; |
Forum: C++ Aug 27th, 2009 |
| Replies: 2 Views: 360 ... and perform the outer loop in reverse direction to avoid problems with overlooking the next element after erasing or index going out of bounds when erasing the last element |
Forum: C++ Aug 25th, 2009 |
| Replies: 8 Views: 257 Usually std::map is implemented using a rb-tree (red-black-tree) and not a B-tree (Bayer-tree) |
Forum: C++ Aug 25th, 2009 |
| Replies: 4 Views: 281 Move this
int sum1 = numX - numZ;
int sum2 = numX - numY + numZ;
int sum3 = numX + numY;
int sum4 = numX + numY + numZ;
int sum5 = numX;
int sum6 = numX - numY... |
Forum: C++ Aug 21st, 2009 |
| Replies: 6 Views: 657 Then mark this thread as solved, please |
Forum: C++ Aug 21st, 2009 |
| Replies: 5 Views: 200 Show what you've done so far.
I don't think so. |
Forum: C++ Aug 21st, 2009 |
| Replies: 6 Views: 657 If the COM1 port is in use by an other process, this resource is locked by the OS and subsequent tries to open the COM1 port will fail. |
Forum: C++ Aug 20th, 2009 |
| Replies: 2 Views: 481 Hamming Code C++ (http://tinyurl.com/nkkzao) |
Forum: C++ Aug 20th, 2009 |
| Replies: 1 Views: 186 I just took a short glance at your code. The second call to SortHeap works on an already sorted array, so maybe it's better to sum up the return values of the first call
int main()
{
int i,... |
Forum: C++ Jul 23rd, 2009 |
| Replies: 13 Views: 532 This code works (cut 'n paste it and try it on www.codepad.org):
#include <iostream>
using namespace std;
int dayNumber(int year, int month, int day)
{
int... |
Forum: C++ Jul 23rd, 2009 |
| Replies: 7 Views: 695 Can't believe that you have searched.... google("change background color CTabCtrl") gives many hits, i.e.
http://www.codeguru.com/forum/archive/index.php/t-141641.html |
Forum: C++ Jul 23rd, 2009 |
| Replies: 7 Views: 695 You can find many examples on www.codproject.com and www.codeguru.com. Just search!!! |
Forum: C++ Jul 23rd, 2009 |
| Replies: 2 Views: 246 UL-Speed = (amount of data)/(time to send that amount of data), so if you need 5 secs to send 1000 KB you have a speed of 200 KB/s. |
Forum: C++ Jul 22nd, 2009 |
| Replies: 4 Views: 279 Did you try to debug step by step? |
Forum: C++ Jul 21st, 2009 |
| Replies: 4 Views: 371 Translation for beginners ;)
search Google for: CTreeCtrl background image
select the second topic found (@codeguru.com) |
Forum: C++ Jul 21st, 2009 |
| Replies: 2 Views: 244 Probably because C# puts declaration and definition into the same file and they use the same code base for C++/CLI |
Forum: C++ Jul 21st, 2009 |
| Replies: 4 Views: 232 |
Forum: C++ Jul 21st, 2009 |
| Replies: 4 Views: 371 int main()
{
HTMLPage& page = google("CTreeCtrl background image");
page.select2nd(topic);
} |
Forum: C++ Jul 21st, 2009 |
| Replies: 3 Views: 177 |
Forum: C++ Jul 21st, 2009 |
| Replies: 6 Views: 502 fout.close();
surely should be outside the while loop |
Forum: C++ Jul 21st, 2009 |
| Replies: 3 Views: 346 COrder() {::memset(this,0,sizeof(*this));}
I really hope that you know what you are doing here.... |
Forum: C++ Jul 21st, 2009 |
| Replies: 6 Views: 502 while (true)
{
if (!fin.good()) break;
string lineFromFile;
getline(fin, lineFromFile);
cout << lineFromFile << endl;
} // while |
Forum: C++ Jul 21st, 2009 |
| Replies: 6 Views: 502 Any error messages from the compiler? I only get a warning, which can be eliminated by changing
for (int i = 0; i < s.length(); i++) // for each char in the string...
to
for... |
Forum: C++ Jul 20th, 2009 |
| Replies: 7 Views: 298 ... and not to forget: http://www.daniweb.com/forums/thread78223.html |
Forum: C++ Jul 20th, 2009 |
| Replies: 2 Views: 211 You are calling askText() in the ctor of StoryWordManager as well as in the main() program. |
Forum: C++ Jul 17th, 2009 |
| Replies: 4 Views: 152 You declared an array with 9 elements, but generate_array() and print_array() operate on 10-element-arrays
You have three options:
1. pass the size of the array as an additional parameter to... |
Forum: C++ Jul 16th, 2009 |
| Replies: 4 Views: 299 strcpy() is for copying null-terminated C-strings, but you have only a single char(acter). |
Forum: C++ Jul 16th, 2009 |
| Replies: 2 Views: 320 Use std::vector instead of an array. |