Forum: C# Nov 17th, 2008 |
| Replies: 5 Views: 750 oh! sorry for my misunderstanding:) |
Forum: C# Nov 17th, 2008 |
| Replies: 5 Views: 750 he only need to find out first 6 highest salary, but no requrement for any sort on these 6 highest salary... |
Forum: C++ Nov 17th, 2008 |
| Replies: 15 Views: 910 read this code below and you'll know how to modify your code:
int main(int argc, _TCHAR* argv[])
{
char songTitle[100];
cin.getline(songTitle,100);
cout<<songTitle<<endl;
return 0;
} |
Forum: C++ Nov 17th, 2008 |
| Replies: 7 Views: 1,450 Maybe you didnt understand what i mean,
A behavior(function) is belong to a object, it can not exist seprately.
In the situation of this problem, it is definitely correct.
1.) Virtual
2.)... |
Forum: C++ Nov 16th, 2008 |
| Replies: 5 Views: 380 just simply modify your findMax function to the code i gave you. |
Forum: C# Nov 16th, 2008 |
| Replies: 5 Views: 750 select top 6 * from table_name order by salary asc |
Forum: C++ Nov 16th, 2008 |
| Replies: 7 Views: 1,450 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... |
Forum: C++ Nov 16th, 2008 |
| Replies: 5 Views: 380 int max_id = -1;
for (int i=0; i<NUM_FISH; i++)
{
if (fish[i]>max) {
max=fish[i];
max_id = i;
}
}
cout<<"The... |
Forum: C++ Nov 16th, 2008 |
| Replies: 15 Views: 910 just take your code as an example:
char songTitle[3];
songTitle is ONLY capaple to store 2 characters you input, and songTitle[2], the last of this array , need to carry a '\0' to indicate string... |
Forum: C++ Nov 16th, 2008 |
| Replies: 15 Views: 910 if you just allocate 3 chars to a char array,
you can only input 2 chars, because a char array need '\0' to indicate its end. |
Forum: C++ Nov 16th, 2008 |
| Replies: 1 Views: 318 the first 2 questions can be solved by the following sample code:
find(char * lpPath)
{
char szFind[MAX_PATH];
WIN32_FIND_DATA FindFileData;
strcpy(szFind,lpPath);
... |
Forum: C++ Nov 16th, 2008 |
| Replies: 15 Views: 910 cin.getline() needs char* as its arguments, so you have to declare an char array to store the data. Then pass the length of the string you input.
sample code:
char str[100];
cin.getline(str,100); |
Forum: C++ Nov 16th, 2008 |
| Replies: 15 Views: 910 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... |
Forum: C++ Nov 16th, 2008 |
| Replies: 2 Views: 1,816 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... |
Forum: C++ Nov 16th, 2008 |
| Replies: 6 Views: 1,759 hi minas1 !
Have you implemented the function 'palindrome' in a c/c++ file? |