User Profile

Collapse

Profile Sidebar

Collapse
vin029
vin029
Last Activity: Jul 6 '08, 09:02 AM
Joined: Nov 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • vin029
    replied to problem with streambuffer
    in C
    please experts help me

    even i tried in this way also

    Code:
    char ch[100];
    pFile = fdopen (fd,"r");
    fgets(ch, 90,pFile);
    know is there any way i can convert character buffer to stream buffer
    please tell me if any alternate solutions for this problem.

    at the end i want the output in streambuffer.
    See more | Go to post

    Leave a comment:


  • vin029
    started a topic problem with streambuffer
    in C

    problem with streambuffer

    Hello experts,

    i have one query which i am not able to solve please suggest me my problem is i have to open a filedescriptor and have to store the contents in streambuffer,

    i,e
    Code:
    int main () {
    
     char ch;
     streambuf * pbuf;size_t size;
      ifstream istr(const char *)fd);
      pbuf = istr.rdbuf();
    
      while (pbuf->sgetc()!=EOF)
      {
         ch = pbuf->sbumpc();
    ...
    See more | Go to post

  • vin029
    replied to Implementing Zlib function
    in C
    ok sorry for the multiple post, from next time onwards i will
    take care of this , plz answer to my question.
    See more | Go to post

    Leave a comment:


  • vin029
    started a topic Implementing Zlib function
    in C

    Implementing Zlib function

    Hello all,
    i want to implent ZLIB function in c or c++ which should work on all environments ,
    like windows, linux and unix , menas when i execute those cpp files it should ask the file to be compressed and it should compress it , please help me in getting the source code of zlib
    and also how to implement,
    thank in advance.
    See more | Go to post

  • vin029
    replied to fgets function
    in C
    hello ,
    i got the answer i understood the use of feof
    i modified the code as
    Code:
    while(1)
    {
    fgets(str,80,pFile);
    if(feof(pFile))
    break;
    printf("%s",str);
    }
    and also no need to use the feof() instead

    Code:
    while(fgets(str,80,pFile)!=null)
    {
    }
    this also works.
    See more | Go to post

    Leave a comment:


  • vin029
    replied to fgets function
    in C
    hello sir,
    i really tried i think i have done mistake with clearerr() function but even though
    iam including that iam not reaching the exact, please really i have tried that one , please correct my code and show me that exactly where i went wrong then it will be a very great help to me . because u people r very expert.
    please please help me.
    See more | Go to post

    Leave a comment:


  • vin029
    replied to fgets function
    in C
    thank you for reply,
    please tell me , if u have understood my mistake iam eagerly ,
    searching for the solution any how i tried myself also if u can tell it
    will be a great help me to me.
    See more | Go to post

    Leave a comment:


  • vin029
    started a topic fgets function
    in C

    fgets function

    Hello all,
    iam using fgets() function to read from the stream,

    Code:
    pFile = fopen ("al.odl","r");
    while (!feof(pFile))
    {
    fgets(data, 80,pFile);	
     printf("%s", data);
    }
    fclose(pFile);
    it should give me
    Code:
    al : Object
    {
        initialize : Expr()
        {
            @Println("al loaded");
        }
    }
    ...
    See more | Go to post

  • vin029
    replied to How to read from file descriptors.
    in C
    Hello thank u for reply ,
    but as my question is here file descriptor not the character array,
    ifstream s((char *)fd);
    here the fd returns interger value, so is there anyway of getting the contents of fd so that they can be stored in the streambufer, please help me.
    See more | Go to post

    Leave a comment:


  • vin029
    started a topic How to read from file descriptors.
    in C

    How to read from file descriptors.

    Hello all,

    Hello all,
    iam working on some project in which i need to open a file descriptor and send it to the streambuf,
    which can be done like this

    Code:
    Code:
    ifstream f(fd);
    streambuf * buf2=f.rdbuf();
    but main problem is that they are casting to

    Code:
    Code:
    ifstream f((const char *)fd)
    streambuf * buf2=f.rdbuf();
    because of which the file is not getting...
    See more | Go to post
No activity results to display
Show More
Working...