thanks.
now that cleared my confusion & everything works just fine.
User Profile
Collapse
-
thanks for the reply.
when i included #include <string> instead of #include <string.h>,
the problem is solved.
what is the difference between the files string and string.hLeave a comment:
-
problem using strtok_s
I was using Visual C++ 6.0, where strtok worked quite fine.
But now i've been asked to use VS 2005 & i desperately need to use strtok_s. But during compilation, error is shown as 'strtok_s': identifier not found. i am comparatively new to VS 2005.
could anyone please help me. -
regarding array
[code=c]#include<stdio. h>
int arr[] = {1, 2, 3, 4, 5};
#define NUMBER_OF_ELEME NTS (sizeof(arr) / sizeof(arr[0]))
int main()
{
int index = -1;
if (index <= NUMBER_OF_ELEME NTS - 3)
printf( "A problem is not a problem if it CAN be solved\n"
"A problem is not a problem if it CANNOT be solved\n");
... -
why use empty structs
An empty struct has no member variables.
Then for what purpose do we use them?
please help me.Leave a comment:
-
Consider a struct as below.
struct Test1 {};
I got from the net that C++ allows empty struct or class (gcc 4.0 supports empty struct even in C). Empty struct/class can be used as a placeholder for future development.
Can somebody illustrate how an empty struct can be used as a placeholder.Leave a comment:
-
empty structs
can somebody give me a use for a struct with no member variables.
No activity results to display
Show More
Leave a comment: