How I Use Nameless Objects In C++? - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > Other Programming - Perl, C++, Java, ASP, .NET Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-15-2010, 04:41 AM   #1 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 35
Question How I Use Nameless Objects In C++?

How I Use Nameless Objects In C++?
Thank you.
luky is offline   Reply With Quote
Sponsored Links
Old 07-07-2011, 04:22 AM   #2 (permalink)
t0l
Junior Member
 
Join Date: Jul 2011
Location: Beijing
Posts: 31
Default Re: How I Use Nameless Objects In C++?

what do you means Nameless Objects?
t0l is offline   Reply With Quote
Old 07-20-2011, 09:47 AM   #3 (permalink)
Junior Member
 
Join Date: Jul 2011
Posts: 1
Default Re: How I Use Nameless Objects In C++?

I am visiting this blog for first time. I am proud to say that I’ve become a great fan of this blog officially. A good blog always comes-up with new and exciting information like this one. Anyone who really wants to read a article with full of information, should read this.
manaya is offline   Reply With Quote
Old 07-20-2011, 12:06 PM   #4 (permalink)
Regular User
 
Join Date: Sep 2009
Location: seo expert
Posts: 349
Send a message via Yahoo to warrichpk
Default Re: How I Use Nameless Objects In C++?

Quote:
Originally Posted by manaya View Post
I am visiting this blog for first time. I am proud to say that I’ve become a great fan of this blog officially. A good blog always comes-up with new and exciting information like this one. Anyone who really wants to read a article with full of information, should read this.
Hello,

From understanding your question i think i might be close to answer it, I will give it a try.
I think you mean nameless objects- Anonymous variables & objects

Anonymous instances are objects that you strictly need to construct and send/mail somewhere else like for an example calling a function from a register or any block, but again you don't need to know anything about afterwards or the results which are going to occur. Unlike other objects, anonymous instances have a scope and a good chance that lasts only until the end of the expression they are created in.


For a short example, you can try this simple code,

" foo(MyClass("abc")); "
Note : please ignore the quotations in the above line code
warrichpk is offline   Reply With Quote
Old 07-21-2011, 02:12 AM   #5 (permalink)
Regular User
 
pratap295's Avatar
 
Join Date: Jul 2011
Posts: 48
Default Re: How I Use Nameless Objects In C++?

The following example shows that using a nameless object:-

Person* func(){

// stuff

return (new Person());
}

int main(){
Person* aPerson;

aPerson = func();
}
pratap295 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:04 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting