2D Anime Little Witch Academia Trailer by Trigger

2D Anime - Little Witch Academia Trailer by Trigger

Highly anticipated Japanese Anime by Trigger Animation Studio!

Read More..

Lip Sync How to make lip sync animation easy Animation Salvation

http://www.evokoo.com/blog/lip-sync-tutorial-chinese (Chinese Sub)

1. Foundation - act it out
2. Structure - Open/Close, Wide/Narrow (Fist under chin feel if chin is open)
3. Detail - add in eye, brows animation
4. Polish - personality









Animation tutorials

Read More..

Illumination Entertainment Dr Seuss The Lorax Playlist



Illumination Entertainment - Dr. Seuss The Lorax Playlist



The 3D-CGI feature Dr. Seuss The Lorax is an adaptation of Dr. Seuss classic tale of a forest creature who shares the enduring power of hope. The animated adventure follows the journey of a boy as he searches for the one thing that will enable him to win the affection of the girl of his dreams. To find it he must discover the story of the Lorax, the grumpy yet charming creature who fights to protect his world. -- (C) Universal


Official Web: http://www.theloraxmovie.com/
Illumination Entertainment: http://www.illuminationentertainment.com/



Playlist includes Trailers, Behind the Scene:
http://www.youtube.com/playlist?list=PL0616BD4EABF49A7E

Read More..

Disney Animation Shorts Paperman

Disney Animation Shorts - Paperman


Disney Animation Shorts - Paperman
http://www.youtube.com/watch?v=aTLySbGoMX0


Making of Paperman and the future of 2D Animation
http://www.youtube.com/watch?v=TZJLtujW6FY
Read More..

Anatomy for Animals

Read More..

Shop brings more mothering approach to computer repair

Your computers making a funny noise. It wont turn on. Smokes pouring out the back.

Maybe you spilled orange juice on it. Or ran over it with user car.

That Computer Chick has seen it all — and fixed it — at her two Marietta repair shops. And she doesnt make a peep about how you could possibly have gotten userself into this predicament.

Linda Pereira, That Chick herself, said many of her male customers have admitted bringing their computers to her because shes a woman.

"Theyre intimidated by the men because the men talk over their heads," she said.

Pereira, 43, has five women on staff, plus one boychick. Thats her son, Andy, whos leaving in a few months for college.

"Were more mothering," Pereira said. "When you come in, we sympathize with user problem instead of being like, You idiot. I think they just want somebody to kind of hold their hand and not make them feel bad."

After all, the company slogan is: "Because you shouldnt hate user remote computer repair."

Pereiras clientele is evenly split between men and women. Her staff works on residential and small business computers and iPods, usually handling three to 10 per day.

Jack McKinney, 77, of Kennesaw, has been relying on That Computer Chick since she went into business in 2003.

"She hasnt let me down yet," he said.

McKinney drops in when hes getting a haircut nearby just to chat and ask questions — free of charge.

"I wish I had a problem because I wish I could go there to get it fixed," he said. "They make it such a pleasure."

Customers enter a welcoming environment where the walls are alligator green, the same color as Pereiras kitchen at home.

"Its very soothing," she said.

The lighting is kept low and the floors are wooden, adding to the homey feel. The counter is metal, and Pereira encourages folks to plop their computers there instead of putting the hardware on the floor, as some shops insist. She knows it can be hard to bend down to pick stuff up.

If kids have to wait a while with their parents, theyre given a bad hard drive and a screwdriver.

"If the kids didnt get it all the way apart and theyre sad they have to leave, shell let the kids borrow the screwdriver and take it home," said Kimberly Austin, a senior technician.

That Computer Chick expects customers to return the favor and be nice, too.

If theyre rude, they run the risk of being assessed a $50 meanie fee. Pereira hasnt charged "the attitude adjustment" fee yet, but has called people and asked them to apologize to her staff. Shes kicked some of them out, too.

"Ive kicked out more women than men," she said with a laugh. "Some of them will apologize, and others will just decide not to come back, and were OK with that, too."

That Computer Chick promotes its family-oriented services, and will help with content filters for children.

If people want to know what their spouses have been up to, Pereira said, "I will give them all the data and I sit down with them privately. "

She works with counseling agencies to refer spouses with addiction problems.

The company also has a donation program, refurbishing cast-off equipment from customers and giving it to people in need.

In Katrinas aftermath Pereira and one of her two daughters drove to New Orleans with five complete systems.

"When people call and ask me, Do you have something really cheap? I always ask them, Are you having a difficult time? Are you struggling? I say, I cant sell you one, but Ill give you one.

"Thats because my customers donated the equipment. If you donate equipment, Ill donate my time."

Pereira requires her staff to have a volunteer background in the community. She said they make the best employees. She has hired both men and women but has a strict "no nerd" policy.

"You can tell a major nerd," she said, "and I have fired many, many a major nerd."

So, how does a nerd get fired? "They start messing with my equipment and thats when Im done," Pereira said, laughing.

Whatever their gender, Pereiras staff does what they call "that chick thing," customizing computers without any bells and whistles.

For example, they put user data back where you left it, "instead putting it in some bizarre folder," Pereira said.

But they do take out the bugs — sometimes literally.

Pereiras staff has found spiders and cockroaches — dead and alive — inside computers.

And thats not all they discover.

Betsy Collins, 19, who is working her way up to junior tech, recalls the slurping noise a keyboard made when Pereira removed it from a laptop.

A man had forgotten to mention that his wife had spilled a milkshake on it.

"The milkshake had actually melted onto the motherboard and then it fried the computer repair," Collins said. That Computer Chicks most amazing discovery? How about 122,000 pieces of spyware in a womans remote computer? And Pereira would have found more if the power hadnt gone out in the shop.

"She just had kids," Pereira said, "and kids will go on everything. They dont have anything in their brain saying, Oh, I shouldnt go on that Web site. "

She gave the customer a copy of "Cheep Tips" to avoid the same problem.

The guidelines are so good theyve cut down on some repeat business, but Pereira makes up for it with referrals.

And that chick thing applies across the motherboard.

Austin remembers working on a new hard drive one day. "Then puff! this cloud of smoke came out of the remote computer repair," she said.

What color was it? Pink, of course.

Spyware everywhere

The computer repair terms "trojan" and "spyware," often dont register with customers. So, she explains that each one is like having a fire in user house.

"You wonder, Why cant I sit on the couch? Because the couch is on fire. When people use these anti-spyware products to actually remove those trojans, all theyre doing is putting water on the fire and putting it out. So, now, you just have a charred couch."

So, does Linda Pereira take out the couch and put a new couch in?

"I cant," she said. "I have to rebuild the whole house.

source : ajc.com/business/content/business/stories/2008/06/27/that_computer_chick.html

Read More..

Part 2 Introduction to HTML In Urdu Headings Text Formatting

Read More..

Random number generator in c programming

This tutorial contains
  • How to generate a random number using rand()
  • Simple example using rand() function
  • Generate random number in a specific range dice example

To generate a random number in c++ program first we have to include a header file which is
#include<cstdlib> because we have to use a function from that library which is “rand();” this functions simple returns a random number

Let use that function

#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
  cout<<rand()<<endl;
return 0;
}


It will return a random number for example
41
 Let use a loop and generate some more random numbers using that function

#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
 for(int i=1;i<=10;i++)
    cout<<rand()<<endl;
return 0;
}

It will generate 10 random  numbers
What if we want to generate random numbers with in the specific range like we want to generate random numbers between 1 to 10 or 50 to 100

for example range is 1 to 10

We think something like that cout<<rand()%10;

How it will work
It will take a random number divide it by 10 and return us the number the number can be from 0 to 9
After getting the output we see that if we add 1 in the result value we can get our required range values
So we will change it like that << 1 + ( rand() % 10 ) ;

Lets take another example of a dice it can generate numbers 1 to 6 randomly

 we will simple something like that
But is it write or not


for(int i=1;i<=6;i++)

    cout<< rand()%6<<endl;


And there is a problem it will return us number from 0 to 5 to make the logic of our program we will change it like that
for(int i=1;i<=6;i++)

    cout<< 1+ (rand()%6)<<endl;

So this will work fine in this case 0 is eliminate and whatever number will return 1 will be added in it like if 0 is generated it will result as 1 if 5 is generated it will return us 6
  
Hope this tutorial will help to understand the basic about of random number
Read More..

How to create html Heading or Tag and how to see html source code in web browser



1. Html Heading: Html heading satisfied 1 to 6 tags in a webpage or any website. There is <h1>, <h2>, <h3>, <h4>,<h5>, <h6>.  These tags are building heading in html webpage. The <h1> tag defines the first heading and <h6> tag defines the last tag in html webpage.
Example:
<h1>This is my 1st  heading</h1>
<h2>This is my 2nd  heading</h2>
<h3>This is my 3rd  heading</h3>
N:B: The web browsers atomically add some space in before and after each heading.

2. Headings are the most Important in a webpage: Use only html heading for any webpage. Don’t use heading tag for text bold or big. It is very sensitive for every web builder. The search engine like google can only find your webpage on the heading way or path. If you use heading in for text bold or big, users are not interested in your website.

3. Html Lines: The <hr> tag builds a horizontal line in an HTML page or a website.
The hr element or tag can be used to separate content and post.
 Examples:
<p>This is most important paragraph.</p>
<hr>
<p> This is most important paragraph.</p>
<hr>
<p> This is most important paragraph.</p>

4. HTML Comments: Comments can be choice full into the HTML code to make it more readable and comfortable. Comments are ignored by the browser and are not showable.
Comments are written like this tag or html code:
Example
<!-- This my first comment about the post or content -->

6. How to view HTML source: Have you seen a Web page and wondered "Hello! How did they do that?"
To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page.


Read More..

Outlook Imports Email Addresses from Facebook Offers No Takeout

You can easily import Facebook email addresses, birthdays and phone numbers into the userr Outlook address book but there’s no takeout option.

import facebook email address
The new Outlook.com web mail service from Microsoft makes it super easy for user to import contact details from Facebook and LinkedIn into userr address book. It imports birthdays, addresses, phone numbers (from LinkedIn) and also the email addresses of userr Facebook friends.
If user haven’t had a chance to try this yet, go to outlook.com and switch to the People tab (see video demo below). Now choose “Add People” from the “Manage” menu and choose Facebook from the list of available options.
Outlook will now import userr Facebook friends details into userr address but this data won’t include their email addresses. Open the “Add People” menu again and now user will see an option to import Facebook email addresses.
Outlook is a one-way street
This is useful because user can export userr Outlook address book as a CSV file and import it into other systems like Gmail but there’s one big limitation.
Outlook will not let user export any data that was auto-imported from a social network network like Facebook, Twitter or LinkedIn. You can see the imported email addresses, phone numbers and birthdays of contacts inside Outlook.com but user can’t take this data out to another service at least yet. If user add any custom data to an auto-imported contact, that data will however be included into the CSV file.
Fortunately, there’s Yahoo! Mail that does allow quick export of Facebook email addresses.

Video – Import Email Addresses from Facebook


Read More..

Samsung SGH t629 Review

http://z.about.com/d/cellphones/1/0/S/r/4/samsung-t629-multi.jpg

Checked December 2006 by Tanker Bob
Each mobile phone brings its own charm to the market.  The t629 arrives in attractive silver with a solid slider design.  The phone sports a large, 2.1” color display, a 1.3 megapixel camera/camcorder, Bluetooth 1.2, microSD slot, and EDGE support.  The t629 box includes the phone with the battery and back cover wrapped separately, matching earbud, travel charger, user manual, and a number of helpful little pamphlets.
Design and Ergonomics
In general appearance from the front with the slider closed, the t629s tapered curves make it look slimmer than a Motorola RAZR, but a ruler shows it to be about the same size across the face.  It measures in at 3.9" x 2.0" x .65" and tips the scales at 3.3 oz.  It actually measures about 1.9” across the top and bottom because of the taper, which is more impressive visually than on the ruler.  The outside rim of the phone is actually the edge of the bottom slider portion.  Note that I didnt find a single specification sheet that matched the actual phone dimensions, with some differing by almost half an inch in length!  Theres still no substitute for a good ruler.
Samsung t629
The standard control buttons on the front provide a good-sized target for even larger fingers, and they are divided by feel on the phone so that they can be confidently operated without looking at them.  The top two keys provide soft key operation, while the bottom two dial or hang up/cancel an operation.  The 4-way directional pad with a center selector provides the same positive feedback as the other keys.  Since the keys are at the bottom of the phone, they are designed to match the tapered appearance and add to the attractive, slim visual impression.
More unusual is the “clear” button below the 4-way pad.  It can be used in text screens to erase the previous character, and in most other screens where youd expect it to work as a cancel button.  Its function has been given careful thought.  If you are not used to its location, however, you may find yourself pressing it instead of the “down” key.
The slider opens easiest by hooking your thumbnail in the slot above the screen and pulling with the other hand on the outside rim of the phone.  The action is positive and solid.  It has a cam-like action so that if you partially close the phone less than half way, it will return to the open position.  Upon passing the approximate half-way point, the slider will move on its own to the close position.  The phones fit in the hand remains about the same, that is quite natural and comfortable with the slider open or closed.
The slider panel essentially provides the flat button surface, but raised ribs separate the buttons for “eyes-free” dialing.  Of course, all the the keys have an effective backlight.  When the slider closes, the phone by default locks the keys against accidental activation.  Unlocking simply involves a two key sequence.  Opening the slider automatically unlocks the keys.  Very handy and natural!
The left edge of the phone houses the volume rocker and the headphone/charging connector, which is covered to keep dust out.  The camera button and microSD slot sit on the right edge.  The latter also has a cover.  Both the headphone/charging and microSD sliders are typical Samsung, requiring a fingernail to pry open.
The battery takes up about two-thirds of the back of the phone, with the SIM card next to it.  The camera lens sits in the top of the back panel, as does the speaker.
Phone Features and Reception
The t629 furnishes quad-band GSM support for the 850, 900, 1800, and 1900 MHz bands.  It supports GPRS and EDGE for data.  The phone is offered by T-Mobile in the US and is locked to T-Mobile.
I never encountered a reception problem with the t629.  It seemed to pick up signals pretty much everywhere my RAZR V3 would, including indoors.  Areas that challenge the RAZR also challenge the t629.  I drove to North Carolina with it, fully expecting the signal to drop out at some point since T-Mobile doesnt have coverage at my destination.  The Samsung easily transitioned to a roaming profile, so smooth in fact that I didnt notice a change in the conversation when it happened.
Samsung t629
Voice quality proved clear and clean, with plenty of volume control.  I found the speaker phone function usable both in a quiet office setting and in a car.  Since the speaker resides on the back, you may want to put it face down if necessary to get more volume, but I never encountered such a situation.  The included headset also furnished clear communications with ample volume.  The plug for the headphone jack is proprietary to Samsung, so chances are that your headset for another phone will not work unless youve had another of the newer Samsungs with the slim jack.
In our tests in the Dallas metro area, the phone managed an average of 60k.  With GPRS, I measured downloads of about 100+K music clips at about 10 KBps.  Thus, it took a good 10 seconds to download short clips.  JPEGs seemed to download too fast to measure, but then they were very small.
Youd expect to find MP3 and HiFi ringtone support, and wouldnt be disappointed here.  If you dont like whats included, then you can download whatever suits your fancy.  Some nice jazz tune, maybe...

Display, Gaming and Multimedia
The bright 2.1” diagonal display possesses 176x220 pixels with 262K colors using TFT technology.  It does a very nice job with small text and pictures.  Its quality isnt as good as the Samsung A900m, but still quite nice.  Its brightness makes it easy to read outside in the sunlight.
Samsung t629
The t629 comes with a very well executed media player that supports supports MP3, MP4, 3GP, and AAC formats.  It can make its own playlists, and directly accesses multimedia files that reside both internally and on the microSD card.  Music and videos play smoothly, and the 4-way pad controls the player in a natural manner–no learning curve involved.  The t629s 21 MB of RAM will hold quite a lot internally, with the microSD card available to hold much more. The t629 can output stereo but youll need to find a Samsung stereo earbud headset to enjoy tunes in stereo.
Samsung pre-loaded the t629 with several games: Bobby Carrot, AirShip Racing, Arch Angel, Freekick, and Midnight Pool.  They are fairly simple, but play well, require a bit of skill, and help pass time when youre waiting on queue.  Their smooth action and good sound quality add to their enjoyment, and their colors look great as well.  The 4-way pad works well in the games.
Camera
The 1.3 megapixel camera produces JPEG images and sports several modes, including video.  Resolution runs from 176x144 up to 1280x1024 pixels, and the 4x digital zoom brings those distant objects up close and personal at the price of some resolution.  If you want to be in the picture, the t629 has a 3, 5, and 10 second timer. Image quality is good by 1.3MP camera standards with mostly accurate colors and decent low light capabilities (though low light images lose color saturation).
If you cover action events like sports, the t629 offers a 6 and 9 picture multi-shot mode which takes that many pictures with a single button press.  Not fast enough?  Then try the 9 or 15 high speed multi-shot mode.  Want to cover a larger area?  The mosaic mode allows pictures to be knit together.
The camera software offers up special effects, changes to color tone, can put a decorative frame around  your pictures, and rotates photos, plus allows the user to control the brightness.
The camcorder mode produces 3GP formatted videos in 176x144 or 128x96 pixels.  The sound may be turned off if desired.  The other controls for modifying or tailoring pictures apply to videos as well, including the timer.
The included picture viewer enables the usual functions (view, copy/move, delete, slide show, etc.), plus permits the user to control Bluetooth access to individual pictures.
sample photo
sample photo sample photo
Bluetooth
Bluetooth 1.2 connects the t629 to the accessory world.  Headset, handsfree, serial port, dial-up networking, file transfer, and object push modes are included.  The Bluetooth function controls in the Samsung cover the usual range, including discovery and security.
I paired the t629 with my Dell Axim X50v with no problem.  I was easily able to browse files on the X50v.  Only supported file formats on the Samsung display in the file manager.  You can use Bluetooth to effortlessly backup your music, pictures, and video files to your PC or PDA.
Battery Life
Samsung quotes 3.2 hours of talk time for the 3.7v, 880 mAh LiIon battery, with 160 hours of standby time.  My experience with the phone finds no fault with those numbers, and would even add to the standby time.  After sitting for five days, it still had about half its battery life remaining.  This puts it on the upper end of battery life with its competitors.
Software
In addition to the games already mentioned, the t629 holds the usual collection of applications found on mobile phones.  The list includes a calendar, tasks, calculator, units converter, alarm clock, world time, timer, and stop watch.  All this makes the t629 a pretty handy device to have around.  The Samsung supports Java applications.
The phone software will track calling times, and remembers the last 30 incoming, outgoing, and missed calls.
Messaging includes enhanced messaging service, IM, text messaging, and multimedia messages for pictures and video.  Input modes include the usual predictive T9, direct alpha, number, and symbols.  Note that email is not supported.  The t629 can also create voice messages, so that you can record your thoughts on the run.
The WAP browser is your average feature phone affair.  It works fine but there isnt anything special here.  Browser loading time was quicker than some phones, faster than the RAZR V3 but of course not as fast as the Samsung A900m on Sprints EVDO (3G) network.
Conclusion
The Samsung t629 fit in the fray as a mid-range phone.  It presents an attractive, tapered appearance that also helps it fit nicely in your hand.  With 21MB of RAM and microSD slot, you wont hurt for storage space, and its wide support for messaging formats will keep you in touch.  The built-in applications will help keep you on time and even tell you how many liters in a gallon.  If youre looking for a phone that does all the now-common mobile functions to keep you connected and on time, the Samsung t629 stands worthy of your consideration.
Pros:
Attractive in business and personal settings
Excellent calling reliability
Compact slider design
Solid construction
EDGE capable
Cons:
No email support
No stereo headset included and its not easy to find the proper one to fit the phone
Price: $49 with 2 year contract after rebates



Specs:
Display: 2.1” diagonal, 176x220 pixels, 262K-color TFT.
Battery: 880 mAh lithium-ion; Talk Time: Up to approximately 3.2 hours continuous digital talk time advertised; Standby Time: 160 hours to 8 days depending on whose data you believe.
Performance: Intel XScale PXA 255 400 MHz processor. 64 MB built-in RAM (55 megs available). 32 MB Flash ROM with 2.85 megs available in File Store for your use.
Size: (H x W x D): 3.9" x 2.0" x .65"; 3.3 ounces.
Phone: GSM quad band 850/900/1800/1900MHz world phone with EDGE and GPRS for data.
Camera: Integrated digital 1.3 megapixel at 1280x1024, 1152x864, 800x600, 640x480, 240x320, or 176x144 pixel; 4x digital zoom; video at 176x144 or 128x96.
Audio: Supports MP3 ringtones; 3GP, AAC, MP3, MP4 playback, vibration alert, and silent mode; Speech recognition, voice memos, speakerphone; media player software.
Networking: Class 2 Bluetooth version 1.2.
Messaging: T9 predictive text input, SMS, MMS Picture / video mail, EMS, IM.
Software: Media Player, Voice Message, Alarm Clock, Calendar, Calculator, Tasks, Timer, Stopwatch, Unit Converter, WAP Browser, and World Clock.
Expansion: 1 MicroSD slot.
                                                         ( Author : Tanker Bob, Source : mobiletechnews )
Read More..

Wrapper Classes Type Wrapper in java

DEFINITION :

Wrapper classes in java as the name wraps or encapsulates the primitive data types such as int, char etc. and gives them an object like appearance which is mostly used in Collections because in Collections we can only add objects. They are also known as Type Wrappers because they convert the data types into a class type.

WHY WE USE THEM?

Since java is object oriented language in which every single element should be treated as object whether it is a file, image or anything but it uses primitive data types which are not actual objects and we cannot pass them by reference, they are passed by value and also we cannot make two references which refer to same data.
Java only uses these primitive data types for performance reasons and hence there should a way in which we can convert them into objects and for this designers create
Wrapper Classes.

Basically there are two important uses of wrapper classes :

1. To convert a primitive data types into objects, that is to give them an object form.
2. To convert strings into data types which is known as the parsing operations in which various methods such as parseInt(), parseFloat() etc. are used.

LIST OF WRAPPER CLASSES :

There are 8 wrapper classes for every data type in java. They all lies in java.lang package which is implicitly imported into our programs and hence they are available without importing any package.





These eight Wrapper classes provides methods and Constructors for making the object of primitive data types and getting back the value from object.

EXAMPLE OF USE OF WRAPPER CLASSES :

Consider the code,

int i = 100;
Integer ib = new Integer(i);

In the first statement i is declared as the variable of int data type and then it it Wrapped or boxed into an object of the type Integer which is a wrapper class. This is also known as
boxing.
Now, this Integer type ib can be used anywhere as an object.






We can also get back the data type from the object by using the method intValue() which is static in Integer Wrapper class as :

int iu = ib.intValue();

This is known as Unwrapping or Unboxing.
There are also some constants in the wrapper classes which gives you the maximum and minimum value of data types which is defined by the language. These are :
MAX_VALUE, MIN_VALUE

Here is another example of parsing a String as an integer through the Wrapper classes.

String s = "13";
int value = Integer.parseInt(s);

The method parseInt() gives the NumberFormatException if you pass the String which has a value other than int.

In the new versions of java there is way for autoBoxing and autoUnboxing.

//AutoBoxing
int i = 100;
Integer ib = i;

//AutoUnboxing
int iu = ib;

There is large use of Wrapper classes for object conversion in Collections.
Read More..

Problems on Operator Overloading I

Here Im listing some problems related to Operator Overloading to spice up
the discussion a bit. This is a TWO part series so read the next
article
after solving each of the problems listed here.



Problems
on Operator Overloading I


Problems
on Operator Overloading II



Problem #1: Point out the error(s)
if any in the following code:



1 // Problem #1:
2 // Problem related to
3 // Operators Overloading
4 #include <iostream.h>
5
6 class myclass
7 {
8 int a;
9 int b;
10
11 public:
12 myclass(){}
13 myclass(int x,int y){a=x;b=y;}
14 void show()
15 {
16 cout<<a<<endl<<b<<endl;
17 }
18
19 myclass operator+(int);
20 };
21
22 myclass myclass::operator+(int x)
23 {
24 myclass temp;
25
26 temp.a=a + x;
27 temp.b=b + x;
28
29 return temp;
30 }
31
32 void main()
33 {
34 myclass a(10,20);
35
36 a=a+10;
37 a.show();
38 }

Problem #2: Point out the error(s)
if any in the following code:



1 // Problem #2:
2 // Problem related to
3 // Operators Overloading
4 #include <iostream.h>
5
6 class myclass
7 {
8 int a;
9 int b;
10
11 public:
12 myclass(){}
13 myclass(int x,int y){a=x;b=y;}
14 void show()
15 {
16 cout<<a<<endl<<b<<endl;
17 }
18
19 int operator=(int);
20 };
21
22 int myclass::operator=(int x)
23 {
24 a=x;
25 b=x;
26
27 return x;
28 }
29
30 void main()
31 {
32 myclass a(10,20);
33 myclass b,c;
34
35 c=b=a;
36
37 c.show();
38 }

Problem #3: Point out the error(s)
if any in the following code:



1 // Problem #6:
2 // Problem related to
3 // Operators Overloading
4 #include <iostream.h>
5
6 class myclass
7 {
8 int a;
9 int b;
10
11 public:
12 myclass(){}
13 myclass(int x,int y){a=x;b=y;}
14 void show()
15 {
16 cout<<a<<endl<<b<<endl;
17 }
18
19 myclass operator++();
20 };
21
22 myclass myclass::operator++()
23 {
24 a++;
25 b++;
26
27 return this;
28 }
29
30 void main()
31 {
32 myclass a(10,20);
33
34 ++a;
35
36 a.show();
37 }

ANSWERS:




  1. No Errors




  2. No Errors



  3. We need to return the object and not the pointer
    (this)
    . The statement should have been, return *this;


Related Articles:


Read More..

Blog Archive

Powered by Blogger.