Search Results

Showing results 1 to 9 of 9
Search took 0.00 seconds.
Search: Posts Made By: kbshibukumar ; Forum: C++ and child forums
Forum: C++ Mar 6th, 2009
Replies: 6
Solved: hash map in STL
Views: 4,134
Posted By kbshibukumar
I don't know if there is any stl hash_map. U need to use just map instead, with a #include <map>
Forum: C++ Mar 5th, 2009
Replies: 6
Solved: hash map in STL
Views: 4,134
Posted By kbshibukumar
The map as a whole can not displayed using cout. Try
Forum: C++ Mar 5th, 2009
Replies: 6
Views: 696
Posted By kbshibukumar
Of course, if you put the delete statement after the return statement, it won't be executed at all. Instead you can do like
Forum: C++ Mar 5th, 2009
Replies: 6
Views: 696
Posted By kbshibukumar
If you are afraid of delete, using auto_ptr can be a good option.
Forum: C++ Feb 19th, 2009
Replies: 7
Views: 1,160
Posted By kbshibukumar
The problem is that when your function is returning a string, it first makes a copy of the string to be returned (in your case, it is NULL). For making copy, it has to take the length of the original...
Forum: C++ Feb 18th, 2009
Replies: 4
Views: 301
Posted By kbshibukumar
The problem seems to be in

while(isalpha(ch))
{
text[i] = ch;
i++;
}

If the first character is an alphabet, it will go on filling the array text with that...
Forum: C++ Feb 9th, 2009
Replies: 4
Views: 636
Posted By kbshibukumar
only the first example invokes copy constructor. If the second one needs to work in the same manner as copy constructor does, you have to overload the assignment operator.
Forum: C++ Jan 15th, 2009
Replies: 8
Views: 539
Posted By kbshibukumar
[] operator is the best to add values to an array, I think. Applicable only if you know the index in advance.
If you have to search in runtime for the position to which we can add a value, it will...
Forum: C++ Jan 15th, 2009
Replies: 13
Views: 1,076
Posted By kbshibukumar
I wonder when the loop while (*a++ = *temp++) will end. Also, as you have done an a++, the beginning of the string is altered.
I suggest using the following code.
int i = 0;
while (i <...
Showing results 1 to 9 of 9

 


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

©2003 - 2009 DaniWeb® LLC