Hi jerico,
int main()
{
char *t="hello",*r;
r=t;
*r='H';
printf("%s",t);
return 0;
}
I could not understand ur motivation. If you wanted to reassign some string then its not possible to update a constant data.
By the way where r u from?
User Profile
Collapse
-
Hello Mansi,
A smart pointer is a C++ class that mimics a regular pointer in syntax and some semantics, but it does more. Because smart pointers to different types of objects tend to have a lot of code in common, almost all good-quality smart pointers in existence are templated by the pointee type, as you can see in the following code:
template <class T>
class SmartPtr
{
public:
...Leave a comment:
-
PLEASE PLEASE HELP .......[ Specially to BANFA ]
SOMEONE PLEASE GIVE SOME FREE LINK OR E-BOOK on MFC ............... -
MFC Book -------------- HELP PLEASE
I'm currently reading the book of Programming WINDOWS with MFC by Jeff Prosise, but I can't understand the book as a begineer. Please sujest some book. Or send me some E-Book regarding MFC to the following mail-ID:
anupam.sen@gmai l.com
OR
anupam.sen@hotm ail.com
I would be thankfull to this community. -
-
What was that dhirajrane ? I didn't mean the general constructor and destructor. It was overloaded destructor ( whether we can define more than one destructor in a class or not ) ?Leave a comment:
-
Regarding "#pragma once" and "Lvalue error"
Can anybody please tell me what is
#pragma once
and
why compiler gives "lvalue requirement" errors :confused: -
Is it possible to Overload a Destructor?
Hi Banfa ,
Can we overload destructor ? If yes then plz provide an example ?
If not then why ? -
Avoid getline() function and use simple cin>>
I've modified ur add_contact() function . Try It
void add_contact()
{ node *temp, *temp2;
temp = new node;
cout << "\nPlease enter the name: ";
cin>>temp->name;
//getline(cin,tem p->name,'\n');
//cout<<endl;
cout << "\nPlease enter the birthday...Leave a comment:
-
Exception Handling
Can anyone please tell me whatz the difference between :
_______________ _______________ ______________
thow (Example : throw; )
and
rethrow (Example : throw e; )
_______________ ______ :confused: _______________ ________ -
Making Operating System
Do anyone know, How operating system is being developed ?? How it interacts with peripheral ?
Is there any code that will interact with system when it starts, just as like bootable OS disk
???????????????
:confused:
:confused:
:confused: -
No activity results to display
Show More
Leave a comment: