Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gasingh

    TCP FSM testing software

    Hi All, Can anyone give pointers to free/shareware software for testing TCP FSM. Thanks in advance.
  2. gasingh

    DLL ERROR??? What is this?

    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...
  3. gasingh

    how does one create a .lib?

    Well you can download 'ar' for windows. You can search for Unix Utils on Windows. Hope this helps.
  4. gasingh

    How to monitor a process from a diff. userid

    One way is ofcourse that you can login as root. Well I think sticky bit can also help.
  5. gasingh

    Hi all, I am trying to use the Cti

    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...
  6. gasingh

    Hi all, I am trying to use the Cti

    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...
  7. gasingh

    Hi all, i wrote one code like th

    File1.c _____________________________________________ void f1() { printf("From f1()\n"); } #ifdef _USE_FILE1_MAIN_ int main() { printf("Frim main() File1.c\n"); f1(); f2(); } #endif _____________________________________________ File2.c...
  8. gasingh

    Resize a memory buffer without disturbing contents

    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.
  9. gasingh

    How to compile this file?

    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.
  10. gasingh

    Formatting strings to display correctly

    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
  11. gasingh

    General 3 Dim Array Memory Allocation Question

    of course you are right 1000 * 1000 * 1000 *sizeof(int) is the result. i.e. 4 * 1000 *1000 *1000.
  12. gasingh

    Could you optimized this program......

    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...
  13. gasingh

    basic header-file question

    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...
  14. gasingh

    Resize a memory buffer without disturbing contents

    Well in such a situation allocate memory from heap using malloc(). And then you can realloc() at a later time wih the changed size. Hope this helps.
  15. gasingh

    casts in function-pointer arguments

    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...
  16. gasingh

    input validation

    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 << &quot;Enter an integer:&quot;; cin.getline(userText,30)...
  17. gasingh

    StringCopy Help

    This statement is the culprit:- char* newer = (char*)malloc(sizeof(old)-1) ; see the problem is that you have a declared a string literal &quot;Hello All Now i thought this would work apparently&quot; It is residing at some memory location say starting from 0x1000 in the memory. Now you...
  18. gasingh

    Can not include a header file

    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...
  19. gasingh

    Linker Error (SVGACC)

    &quot;Undefined Symbol &quot;_Symbol&quot; in module noname00.cpp&quot; 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 &quot;Synmbol&quot; in this file(noname00.cpp). The symbol can be a function call or some global...
  20. gasingh

    How to make a dll?

    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)...

Part and Inventory Search

Back
Top