What is the implementation of pointer in prospect of C++ language?

Questions by sachinp1979   answers by sachinp1979

Showing Answers 1 - 2 of 2 Answers

Guest

  • Feb 26th, 2006
 

See Sachidananda Patnaik there are so many implementation of pointer in prospect of c++ language. I think your question is in regards to java, even if is not , i would just like to inform you one of prospect as in java program we use API in java right all this are made of by the implementation C/C++. As far as pointer is concern see every byte in the computer's memory has a address and a value. These are occupied when you write any program to in order to deal with these address you implement pointer. It makes your functions more powerful with different scope.

  Was this answer useful?  Yes

vijay_sastry

  • Mar 18th, 2006
 

C++ is an Object Oriented Programming Language is as we know , perfectly backword compatible with C. Becase of this backword compatibility .. it has got many flaws in it that prevented it to become a really good OOP language. Java was developped by keeping this point in mind . In java we cant find pointers and many other thing which may cause problems to the developped software system.I will demonstrate the flaw in C++ that occured by providing the programmer with grabbing addresses and accessing every memory location, with this simple example.class confidential{ private : int secret_code; public : confidential(int s=0) { this.secret_code = s; } void get_data(int x) { this.secret_code = x; } void display(void) { cout << "The secret code is : " <secret = 888; c.display();return 0;} So , this type of pointer usage in C++ prevented it to provide security to the data members inside an object. But , we cant find such problems with java .

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions