Search:

Type: Posts; User: Shal

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Oh yes! I remember reading something like that......

    Oh yes! I remember reading something like that... i will check it out , that would be better way to answer it. I guess thats what probably the interviewer was expecting!
  2. Qn related to Array, LinkedList, Hashtable, BinaryTree

    Hi,

    I was being asked a Qn in an interview to sort :
    Array, LinkedList, Hashtable, BinaryTree

    based on how quickly can u you access an element from them.

    I found this question difficult to...
  3. Replies
    3
    Views
    940

    Reference and Pointers

    I was going through the Faq- What's the difference between... > '&' and '*' (C++)?

    It says:
    References cannot have operations performed on them since they are not variables

    but if I have...
  4. Replies
    9
    Views
    2,958

    difference between ++i & i++

    Is it true that for built in types, pre increment and post increment have no effect on optimization?

    i.e i++ and ++i does not optimize the code if "i" were an "int"?

    I want to know :

    1. what...
  5. Thread: Reversing string

    by Shal
    Replies
    6
    Views
    1,390

    Ya, making "str" as an array works! But y does it...

    Ya, making "str" as an array works! But y does it not work with pointers?
  6. Thread: Reversing string

    by Shal
    Replies
    6
    Views
    1,390

    Reversing string

    hi,

    please see the code below:

    void main()
    {

    int i,len;
    char* str = "shalaka";
    char temp;
  7. Replies
    2
    Views
    1,035

    scope in inheritance

    Hi,

    I have a class say, "A" which is having a pure virtual function "foo". The function foo is public in class A.
    I create another class B, which inherits from A. It defines "foo" as private.
    ...
  8. Thread: Realted to File

    by Shal
    Replies
    5
    Views
    1,085

    Thanks for your response. Actually my...

    Thanks for your response.
    Actually my application has to use the ANSI functions because my OS does not support streams.

    Made the correction char[8]
  9. Thread: Realted to File

    by Shal
    Replies
    5
    Views
    1,085

    Realted to File

    I have piece of code which HAS to use the ANSI file functions.

    I have a text file which stores 2 values: Address and Data. Its something like :

    1 233
    48 5.8

    I want to extract these...
  10. Replies
    3
    Views
    1,310

    Thanks for the response!

    Thanks for the response!
  11. Replies
    3
    Views
    1,310

    Returning Pointers

    This always is a confusion for me.

    When is it safe and not safe to return reference to a pointer?
  12. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    Are you suggesting something like this? .h...

    Are you suggesting something like this?


    .h file:


    class CTime
    {
    public:
    CTime(int mn, int hr);
  13. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    sorry implementing in header makes it work ...but...

    sorry implementing in header makes it work ...but does that make the function inline?
  14. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    Yes, declaring in header makes it work.. but does...

    Yes, declaring in header makes it work.. but does that make the function inline?
  15. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    Hey Sly.. i don't think i missed anything.....

    Hey Sly..

    i don't think i missed anything.. btw, did u try compiling the code at ur end? did it work?
  16. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    oops!! Now I get the following errors: ...

    oops!!

    Now I get the following errors:

    maincpp.obj : error LNK2001: unresolved external symbol "public: __thiscall CTime<int>::~CTime<int>(void)" (??1?$CTime@H@@QAE@XZ)
    maincpp.obj : error...
  17. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    implementing in header ... makes the code look...

    implementing in header ... makes the code look bad.. n does that mean that template function becomes inline?
  18. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    Here is my .h file: class CTime {...

    Here is my .h file:



    class CTime
    {
    public:
    CTime(int mn, int hr);
    ~CTime();
  19. Thread: Function Template

    by Shal
    Replies
    15
    Views
    1,864

    Function Template

    How to declare function template inside class?


    class CTime
    {
    public:
    CTime(int mn, int hr);

    template<typename Any>
    void max(Any no);
  20. Replies
    1
    Views
    819

    Static and namespace

    If I replace
    static int count;

    with


    namespace
    {
    int count;
    }
  21. Thread: Linked List

    by Shal
    Replies
    8
    Views
    1,106

    That was a very gud info.. but i work on a system...

    That was a very gud info.. but i work on a system with memory limitation. I have to think before I allocate every bit of memory.. so if every time the head pointer takes 4 bytes then if my list goes...
  22. Thread: Linked List

    by Shal
    Replies
    8
    Views
    1,106

    Does making the pointer static avoid memory...

    Does making the pointer static avoid memory allocation for pointer itself i.e 4 bytes?

    In the second reply:


    class list {
    public:
    // Constructors, Destructors, Accessors and...
  23. Thread: Linked List

    by Shal
    Replies
    8
    Views
    1,106

    Linked List

    Hi,

    I am trying to implement a double link list using C++ classes (Don't want to use structure).

    I declare the following as class private data:

    private:
    lList *pNext ; // lList...
  24. Replies
    9
    Views
    5,282

    Y is it bad to use char *?

    Y is it bad to use char *?
  25. Thread: crazy doubt!

    by Shal
    Replies
    4
    Views
    798

    Thanks . solves my problem...

    Thanks . solves my problem...
Results 1 to 25 of 42
Page 1 of 2 1 2