User Profile

Collapse

Profile Sidebar

Collapse
saee
saee
Last Activity: Jun 2 '10, 12:40 PM
Joined: Feb 27 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • saee
    replied to realoc failed
    in C
    hi this is my realloc function
    i have replaced all malloc/realloc by my_realloc.
    i am free ing memory at realloc.
    -----------------------------------------------------------------------------------------
    char* my_realloc (void * current, int size)
    {
    char * temp;

    temp = malloc(size);
    if(temp == NULL) return NULL;
    if(current == NULL) return temp;

    memcpy(temp, current,...
    See more | Go to post

    Leave a comment:


  • saee
    replied to realoc failed
    in C
    hi banfa. thank you for the answer. yes it works fine twice always. but wen it is called 3rd time it gives assertion error.

    "However it could mean that another piece of your program is writing outside the bounds of valid data objects and overwriting and corrupting the pointers you hold which the MSC++ debug heap then detects when you try to free the memory blocks."

    yes. thats why it gives me assertion error with...
    See more | Go to post

    Leave a comment:


  • saee
    replied to realoc failed
    in C
    i bypassed realloc. used malloc and copying existing block to new memory manually.
    but i want to know whts wrong with realloc.

    now i am facing another assertion error with free()

    file : dbgheap.c
    line 1017
    expression :
    _BLOCK_TYPE_IS_ VALID(pHead->nBlockUse)

    in watch window i can see the pointer i want to free is a valid pointer.
    See more | Go to post

    Leave a comment:


  • saee
    replied to realoc failed
    in C
    on abort code exits with code 03.
    See more | Go to post

    Leave a comment:


  • saee
    started a topic realoc failed
    in C

    realoc failed

    i am using realloc several times for the same pointer.
    it does allocate memory 1-2 times and then throws an error debug assertion failed.

    file: dbgheap.c
    line : 609

    expression : _CtrIsValidHeap Pointer(pUserDa ta)


    at this line in code.


    cp->class2q->enqptr = (qptr*)realloc( cp->class2q->enqptr,
    sizeof(cir_q)*( cp->class2q->count...
    See more | Go to post

  • saee
    replied to qt with vc++
    in C
    hi,
    there are no .lib files in lib folder.
    now i need to build libraries. right??
    how to do that??
    See more | Go to post

    Leave a comment:


  • saee
    replied to qt with vc++
    in C
    thanks guys.
    nmake runs successfully.
    this is final message.

    link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:conso le /OUT:..\bin\qmak e.exe @C
    :\DOCUME~1\ADMI NI~1\LOCALS~1\T emp\nm20.tmp

    alright??
    now i made a 'hello' project.
    set include directory.
    build errors:

    1>------ Build started: Project: hello, Configuration: Debug Win32 ------
    1>Performing Makefile...
    See more | Go to post

    Leave a comment:


  • saee
    replied to qt with vc++
    in C
    hi banfa,
    i did it. now it gives error


    .\option.cpp(69 8) : fatal error C1083: Cannot open include file: 'windows.h': No
    such file or directory
    Generating Code...
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
    VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
    ...
    See more | Go to post

    Leave a comment:


  • saee
    replied to qt with vc++
    in C
    when i installed qt it asked for mingw. so, i added bin files. but even if i don't add it it still gives error.
    i tried installing qt again. after 'configure', when i run nmake/make it says
    nmake is not recognized.
    See more | Go to post

    Leave a comment:


  • saee
    started a topic qt with vc++
    in C

    qt with vc++

    hi, i am trying qt with visual studio. hello world program.
    here are the errors.

    >Performing Makefile project actions
    1>'mingw32-make' is not recognized as an internal or external command,
    1>operable program or batch file.
    1>Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\Sys Wow64\cmd.exe'.
    1>Build log was saved at "file://c:\Documents and Settings\Admini strator\My...
    See more | Go to post

  • saee
    replied to problem with setupcomm
    in C
    i will try that n let you know. thanks..
    :)
    See more | Go to post

    Leave a comment:


  • saee
    started a topic problem with setupcomm
    in C

    problem with setupcomm

    hi group,
    i'm reading 100 bytes at a time from com1. this is a continuous loop.
    every time entering the loop it will connect to port (makefile, setupcomm) n terminate conection while leaving the loop.
    sometimes i can read the data n sometime it gives error setup com failed. getlast error returns error code 995.
    setupcomm fails regularly. once in 2-3 reads.data is coming at 115200bps.
    whts the reason. if setupcomm...
    See more | Go to post

  • saee
    replied to socket programming
    in C
    ok. let me state my problem newly.
    my client n server can send n receive data from labview's udp port. but not to each other.as, it can communicate with labview, the code is correct. but i can not send data through this c application. n i can not figure out why.
    See more | Go to post

    Leave a comment:


  • saee
    replied to socket programming
    in C
    help!

    can anybody please answer me?
    See more | Go to post

    Leave a comment:


  • saee
    replied to socket programming
    in C
    hi shreeram,
    i tried. no luck. :(
    r u sure the code is correct?
    See more | Go to post

    Leave a comment:


  • saee
    replied to socket programming
    in C
    same prob with tcp

    i eve tried tcp client- server. same problem! :(
    works with loop back address n not with network addresses.
    See more | Go to post

    Leave a comment:


  • saee
    replied to socket programming
    in C
    yes sure andr3w. here is my code.

    Code:
    ///////////
    client.cpp
    ////////////////////
    
    #include <iostream>
    #include <winsock2.h> 
    
    using namespace std;
    #define SERVER_PORT 3000
    #define BUF_SIZE 4096 // block transfer size  
    #define QUEUE_SIZE 20
    #define IPAddress "127.0.0.1" // Local to the system - Loop back address
    
    //#define
    ...
    See more | Go to post

    Leave a comment:


  • saee
    replied to socket programming
    in C
    i couldn't find a solution for it yet. i have searched on net also. does anybody have a idea where shall i search for the solution at least?
    thnks
    See more | Go to post

    Leave a comment:


  • saee
    started a topic socket programming
    in C

    socket programming

    hello group,
    i'm trying udp socket program. my code works fine with local host ip. i.e 127.0.0.1
    according to my knowledge, if i change the ip address n give remote host's ip, two machines should communicate. it doesn't work. after runing server i checked port engaged with netstat. it shows perticular port in use.
    please tell is there an other settings that i should look for?
    thenk you.
    See more | Go to post

  • saee
    replied to udp connection problem
    in C
    horace1, can you please tell me why is it not working with network ip address?
    Instead of loop back address i will have give another machines IP address. n it shoulld communicate. but server is not responding. it gets hung on Recvfrom().
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...