Well I think you need to export the APIs in the .lib file which seems to be missing. Actually you need to tell which APIs in a dll can be called by other process.
Use format like
__declspec(dllexport) void __cdecl Function1(void);
where __declspec(dllexport) specifies that this function/API...
Oh OK... now I understood your problem... You are very right in judging the problem and telling that it returns pointer to some static object. Actually that is what the behaviour of ctime is expected to be. See this is from the man page of ctime >>>>
The ctime(), asctime(), gmtime(), and...
Well first of all the code snipette posted by you does not compile. Anyways, ctime will format a string based on the input. If you supply same input to multiple calls to ctime() you will get same output string. It does not matter at all if it is in same line or in a different line.
Can you post...
Nope the strncpy will not work in case there is a '\0' in the memory space to be copied. In case you want to allocate another memory chunk and copy then use memcpy(). This does not stop on encountering '\0'.
Hope this helps.
This is because you cannot call any of the function calls from Curses library before initializing.
Call initscr() before calling any of the Curses functions.
Hope this helps.
Use sprintf().
say for
Number of points: 20 SD: 8.733
say you have
int NumPoints = 20;
float SD = 8.733;
char outStr[100];
sprintf(outStr,"Number of points: %d \t\t SD: %f\n",
NumPoints , SD );
hope this helps
Well can you be a bit more specific in terms of the optimization. i.e. what kind of optimizations are you expecting.??
Well ont thing you can do is:
printf("Enter the Departure Time HH:MM\n");
scanf("%2lu:%2lu", &Hours, &Min);
and similarly for the Departure time.
Well...
Well DoraC till an extent you are perfectly right. Header files facilitate in the compilation only. Actualy definitions of function bodies are required at the time of linking.
See you declare the function f() in say A.c . When you COMPILE it it will create say A.o which will have compiled code...
Hi Dora C,
It seems that you have some compiler that is too strict on this. Well I tried this on a compiler and it worked fine after compilation. There were no warnings and nothing. Either you have turned on some more strict compilation options or your compiler is as such strict. Try with...
I am not compiling it... may be you can compile and check. This will give you an idea of how code can be broken in to functions.
Hope this helps.
int main ()
{
int userValue;
char userText[30];
cout << "Enter an integer:";
cin.getline(userText,30)...
This statement is the culprit:-
char* newer = (char*)malloc(sizeof(old)-1) ;
see the problem is that you have a declared a string literal
"Hello All Now i thought this would work apparently"
It is residing at some memory location say starting from 0x1000 in the memory. Now you...
Hi Yasin,
Although it appears to be in the folders like layout etc, but these are just the logical divisions. So you cannot write layout/test.h etc.
Alll these folders are just a way to divide your files in logical groups. These do not actully exist in the file system. That is the reason why...
"Undefined Symbol "_Symbol" in module noname00.cpp"
It seems that your source code has a file named noname00.cpp. Now the problem is that you are using some symbol with the name "Synmbol" in this file(noname00.cpp). The symbol can be a function call or some global...
Extra code ????? It seems that you are creating a MFC dll.
OK go to this link, it will teach you step by step to create a dll. Well you have to create a Win32 Dynamic Link Library(DLL)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.