User Profile

Collapse

Profile Sidebar

Collapse
rsennat
rsennat
Last Activity: Oct 7 '08, 11:05 PM
Joined: Dec 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Oh ok. Thanks a lot for all the information....
    See more | Go to post

    Leave a comment:


  • Thanks for the information.
    And I have one more related query, if polymorphism works with reference to an object, then can we use like this, vector<Vehicle& >?...
    See more | Go to post

    Leave a comment:


  • rsennat
    started a topic std::vector of references to derived class objects
    in C

    std::vector of references to derived class objects

    Hi All,
    Here is the basic example of the using polymorphism. And then my question is below.
    Code:
     typedef std::vector<Vehicle*>  VehicleList;
     
     void myCode(VehicleList& v)
     {
       for (VehicleList::iterator p = v.begin(); p != v.end(); ++p) {
         Vehicle& v = **p;  // just for shorthand
     
         // generic code that works for any vehicle...
         ...
    ...
    See more | Go to post

  • rsennat
    started a topic how to implement unix "more" type interface
    in C

    how to implement unix "more" type interface

    Hi All,
    How can I implement the unix "more", in my application.

    I would be printing a huge amount of data to the console. While doing so, how can I get the size of the console and accordingly give the more prompt and wait for user input keys to scroll further.

    Any ideas??

    Thanks
    Senthil Nathan R
    See more | Go to post

  • Is this efficient,
    Code:
    size_t pos = Path.find_last_of("/");
    if(pos == Path.length()-1)
    {
        Path.erase(Path.length()-1);
    }
    ...
    See more | Go to post

    Leave a comment:


  • rsennat
    started a topic std::string remove the last character if its a '/'
    in C

    std::string remove the last character if its a '/'

    hi,
    how do I remove the last character in a string only if its a "/". otherwise no need to remove the last character.

    im using std::string. tried with find_last_of( ).

    thanks
    rsennat
    See more | Go to post

  • rsennat
    started a topic linking inter dependent libraries
    in C

    linking inter dependent libraries

    Hi,
    what is the order of the libraries in the Makefile, for linking inter dependent libraries. i'm getting linker error for the following scenario.

    I have lib1.a and lib2.a, with which lib1.a needs lib2.a and lib2.a needs lib1.a for linking. How can this be resolved.

    any thoughts on this would be helpful.

    thanks
    rsennat
    See more | Go to post

  • rsennat
    replied to std::string append problem
    in C
    It got fixed when I used it as,
    xmlMessage.appe nd(xmlobj.GetRe sponseMsg().c_s tr());
    instead of
    xmlMessage.appe nd(xmlobj.GetRe sponseMsg());

    How there could be a different behaviour when using a "string" or a "const char*" for the string api's.

    thanks
    rsennat...
    See more | Go to post

    Leave a comment:


  • rsennat
    started a topic std::string append problem
    in C

    std::string append problem

    Hi,
    I have a strange problem with strings concatenation. I have a xmlobj, which contains request, response, status, notification and control which are all of type std::string.

    When I dump that, it prints every member variable properly. But when I concatenate as below, "response" string alone is not appended. though the data is there.

    Please help me to fix this problem
    Thanks
    rsennat...
    See more | Go to post

  • rsennat
    started a topic how to initialize 3d array
    in C

    how to initialize 3d array

    hi,
    how do i initialize all the elements of 3d array.

    bool isValid[5][5][5];

    this is a member variable of a class. how to set all the elements of this member variable to FALSE in the constructor of that class.

    thanks
    rsennat
    See more | Go to post

  • rsennat
    started a topic convert std::string to enum
    in C

    convert std::string to enum

    Hi,
    Converting enum to strings is simple. Just we can use the enum as the i ndex to get the string from an array of strings.

    But how do I convert string to enum. Should I need to compare with every string in the array and return the enum when it matches.

    Whats the efficient way to do this?

    Thanks
    rsennat
    See more | Go to post

  • That's the way I'm doing it for putting the data into this.
    But I would like to read the data back from it to build the string buffer table (tabular format).

    Thanks...
    See more | Go to post

    Leave a comment:


  • It's not like that. For a single id, there could be multiple sets of names and values. here for id=100, {name = c1, value = r1}, {name = c2, value = r1}.
    so it goes like that....

    id c1 c2
    ------------
    100 r1 r1
    200 r2 r2

    Any idea how can i build this..
    thanks...
    See more | Go to post

    Leave a comment:


  • how to build string buffer table from std::list and structs

    Hi,
    I'm having the following structures and std::list of that structs.

    I need to read the list of list as below and build a buffer as a table information.
    Any idea on how to build a table info (string buffer).

    list<NVPairsWit hId> m_ResponseObj;

    struct NVPairsWithId
    {
    string m_id;
    list<NVObject> m_NVPairs;
    };

    struct NVObject...
    See more | Go to post
No activity results to display
Show More
Working...