User Profile

Collapse

Profile Sidebar

Collapse
Ferdinend
Ferdinend
Last Activity: Jul 26 '11, 11:13 AM
Joined: Jul 7 '10
Location: Chennai, TN, India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Ferdinend
    replied to Weird behavior of a pointer
    in C
    This is because &a and &b are not consecutive. (Unless you store it in an array.) Still if you want to proceed, get the difference of address by x = &a-&b. Then do cp+=x. It will work.
    But it is not good programing practice. Use array concept.
    See more | Go to post

    Leave a comment:


  • Ferdinend
    started a topic XML read/write using C
    in C

    XML read/write using C

    Hi All,

    I know, there is a way to write/read xml using a DOM/SAX parser which is coded in C++. (i.e, *.cpp file)
    Can we write/read xml using .c file.

    Thanks in advance,
    Ferdinend
    See more | Go to post

  • Hi Danielo,

    you have not coded to catch a string exception.
    Or you have to code for generic catch.
    See more | Go to post

    Leave a comment:


  • Ferdinend
    replied to How to display a circle by c++?
    in C
    If you want to display circle only using console I am not sure.
    But the alternate way is, you can use GLUT libraries or QT in C++ code.
    See more | Go to post

    Leave a comment:


  • While solving diamond of death problem how many VTABLE will be created?

    class A {};
    class B : virtual public A {};
    class C : virtual public A {};
    class D : public B, public C {};


    In this how many VTABLE will be created? And for which classes this VTABLE will be created?
    See more | Go to post

  • Ferdinend
    replied to Usage of const char * const name
    in C
    Question in on const char * const abc..f

    Hi Banfa,

    Thanks to the reply.
    You are absolutely correct about integer. So that only already I have commented the second line of my program.

    But, like that I should not able to change the character pointer value also. But I am able to change it. (Refer line number 3 of my program). My moto is I should not able to change the "cStringVal " value....
    See more | Go to post

    Leave a comment:


  • Ferdinend
    started a topic Usage of const char * const name
    in C

    Usage of const char * const name

    In the below mentioned code, my intension is only to use the values which are received as a arguments. But unfortunately, I am able to change the “cStringVa l”. How to avoid this?


    Code:
    void setValue(const int * const intVal, const char *  const cStringVal)
    {
    	int length=0;
    
    	//*intVal = 50; //Error Can't change the value
    	
    	
    	//assign the another value
    	strcpy(cStringVal, "India");
    ...
    See more | Go to post
    Last edited by Niheel; Jul 13 '10, 04:36 AM.
No activity results to display
Show More
Working...