Search:

Type: Posts; User: vb.bajpai

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds; generated 57 minute(s) ago.

  1. Replies
    11
    Views
    1,848

    aforementioned code snippets do not regard the...

    aforementioned code snippets do not regard the restrictions ... I dont want to create objects of A

    I was thinking in terms that ... since member functions are not saved on per instance basic......
  2. Replies
    11
    Views
    1,848

    call methods across classes

    class A
    {
    void foo()
    {

    }
    };

    class B
    {
  3. Replies
    3
    Views
    1,957

    thank you! , solves all the troubles btw......

    thank you! , solves all the troubles

    btw... what is the difference between -pedantic and -Wall arguments in gcc ?

    I have been using -Wall instead of -pedantic ... so the warnings were bypassed
  4. Replies
    3
    Views
    1,957

    void datatype

    ok ... the trouble started with sizeof(void) = 1

    on similar terms sizeof empty class/structure in C++ is also 1

    Bjarne Stroustrup's FAQ reasons: "To ensure that the addresses of two different...
  5. Replies
    4
    Views
    7,596

    Macros vs Inline Functions

    Inline Functions have numerous advantages over macros

    but is there any scenario when macros can prove advantageous over inline functions?
  6. Replies
    2
    Views
    1,619

    C - Portable?

    referring to ANSI C book by K and R

    "With a little care it is easy to write portable programs, The standard makes portability issues explicit"

    I expects, he hints me, that the C language...
  7. Thread: Overriding

    by vb.bajpai
    Replies
    4
    Views
    1,824

    yeah, bcoz it was never overriden!

    yeah, bcoz it was never overriden!
  8. Thread: Overriding

    by vb.bajpai
    Replies
    4
    Views
    1,824

    Overriding

    Suppose I have class in a library whose method i wish to override, but it is not declared virtual

    How can I go about overriding the method?

    all methods in Java are virtual so, no such problem...
  9. Replies
    3
    Views
    1,058

    Everything is Inherited?

    I tried this :-



    #include<iostream>
    using namespace std;

    class A
    {
    int x;
  10. Replies
    6
    Views
    1,734

    wow! initializer list is the only way i could...

    wow!

    initializer list is the only way i could initialize non-static const members

    thanx!
  11. Replies
    6
    Views
    1,734

    tried this :- class A { public:...

    tried this :-



    class A
    {
    public:
    const int x;
    };
  12. Replies
    6
    Views
    1,734

    Non-static const

    Can i not declare a non-static const data member?



    class A
    {
    public:
    const int x;
    A()
    {
  13. Replies
    5
    Views
    1,840

    Need for a Static Constructor?

    I know we cannot use static as modifier for a constructor

    but we do need a static constructor to initialize all the static data for a class.

    C# explicitly provides static constructors for this....
  14. Replies
    12
    Views
    4,214

    so, are they stored in Heap or Stack???

    so, are they stored in Heap or Stack???
  15. Replies
    12
    Views
    4,214

    Few More Questions!

    Structs in C++ are stored in Stack/Heap?

    What will be the default value of my struct type?

    Assignment of struct types on to another struct type will copy values or reference?
  16. Replies
    12
    Views
    4,214

    Parameterless Constructor - Struct

    Referring to - http://www.codeproject.com/csharp/structs_in_csharp.asp

    Although the CLR allows it, C# does not allow structs to have a default parameterless constructor. The reason is that, for a...
  17. Replies
    1
    Views
    1,533

    Defaults for Constructor

    I read in C++ vs C# section

    C# does not provide defaults for constructors unlike C++

    what does that mean?
  18. Replies
    1
    Views
    3,154

    Destructor Override!

    referring to - "http://msdn2.microsoft.com/en-us/library/szx2ta7y(vs.80).aspx"

    "There are two restrictions on the use of destructors. The first restriction is that you cannot take the address of a...
  19. Thread: this Pointer

    by vb.bajpai
    Replies
    8
    Views
    1,173

    thank you ! In this specific instance,...

    thank you !


    In this specific instance, agreed. No offense, vb.bajpai, but I don't quite think you're ready for this yet.

    I understand, I m just a C++ Beginner
  20. Thread: this Pointer

    by vb.bajpai
    Replies
    8
    Views
    1,173

    Thanx for the first 2 answers, but the third part...

    Thanx for the first 2 answers, but the third part still remains unanswered
  21. Thread: this Pointer

    by vb.bajpai
    Replies
    8
    Views
    1,173

    this Pointer

    referring to http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.15

    not by new[], nor by placement new, nor a local object on the stack, nor a global, nor a member of another object;...
  22. Replies
    7
    Views
    1,660

    thanx !

    thanx !
  23. Replies
    7
    Views
    1,660

    const_cast operator

    #include<iostream>
    using namespace std;

    int main()
    {
    const int x = 10;
    int *p=NULL;
    cout<<x;
    p = const_cast<int*>(&x);
    if(p)
  24. Replies
    2
    Views
    2,214

    RTTI - typeid()

    #include<iostream>
    #include<typeinfo>
    using namespace std;

    class A{};

    int main()
    {
    A a;
    cout<<typeid(a).name();
  25. Replies
    3
    Views
    1,052

    ok thanx one more doubt - ...

    ok thanx

    one more doubt -


    #include<iostream>
    using namespace std;

    class A
    {
Results 1 to 25 of 99
Page 1 of 4 1 2 3 4