Search Results

Showing results 1 to 15 of 15
Search took 0.01 seconds.
Search: Posts Made By: james_zheng
Forum: C# Nov 17th, 2008
Replies: 5
Views: 750
Posted By james_zheng
oh! sorry for my misunderstanding:)
Forum: C# Nov 17th, 2008
Replies: 5
Views: 750
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
just simply modify your findMax function to the code i gave you.
Forum: C# Nov 16th, 2008
Replies: 5
Views: 750
Posted By james_zheng
select top 6 * from table_name order by salary asc
Forum: C++ Nov 16th, 2008
Replies: 7
Views: 1,450
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
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
Posted By james_zheng
hi minas1 !
Have you implemented the function 'palindrome' in a c/c++ file?
Showing results 1 to 15 of 15

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC