No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
7 Posted Topics
Re: 1) use gets() or cin.getline instead of cin to get the input stream, this will not skip any white space; 2) you didnt do the 'search' job to find correct node with the id you input, so all you need to do is just make a loop and find the … | |
Re: you need to have the concept of 'object oriented programing' . A behavior(function) is belong to a object, it can not exist seprately. just like a hand can not do anything if it is not a part of a body.... Thinking in this way you 'll get the idea. if … | |
Re: int max_id = -1; for (int i=0; i<NUM_FISH; i++) { if (fish[i]>max) { max=fish[i]; max_id = i; } } cout<<"The maxmum number of fish caught was " <<max <<"by " <<max_id<<endl; | |
Re: the first 2 questions can be solved by the following sample code: [CODE]find(char * lpPath) { char szFind[MAX_PATH]; WIN32_FIND_DATA FindFileData; strcpy(szFind,lpPath); strcat(szFind,"\\*.*"); HANDLE hFind=::FindFirstFile(szFind,&FindFileData); if(INVALID_HANDLE_VALUE == hFind) return; while(TRUE) { if(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if(FindFileData.cFileName[0]!='.') { strcpy(szFile,lpPath); strcat(szFile,"\\"); strcat(szFile,FindFileData.cFileName); find(szFile); } } else { cout << FindFileData.cFileName; } if(!FindNextFile(hFind,&FindFileData)) break; … | |
Re: hi minas1 ! Have you implemented the function 'palindrome' in a c/c++ file? | |
Re: hi KDan ! the following steps tell u how to create a memory mapped file: 1. use 'open' function to get a file description; 2. create a memory maped file using 'mmap' function, which returns a pointer to the address of the memory; 3. 'munmap' function close a memory maped … |
The End.