Thursday, August 20, 2009

How to extend an array. C++

This post is mainly about the C++ exercise. I think a lot of my classmates might need help on Q3 of the exercise where the teacher will give bonus if we successfully done it.

I don't know if i do it correctly but i can run my program smoothly and there is no error. But the way i do it is correct or not, i am not sure. So, if you feel that my way is wrong, then don't continue to read my post.

Actually it is kind of easy.

First, declare an array with only 1 length.

eg: int a[1];

Second, get an input from user and store it to the first memory space of the array.

eg: cin>>input1;
a[0] = input1;

Third, get another input that u need to store it into the array too

eg: cin>>input2;

Fourth, store it directly into the second memory space of the array.

eg: a[1] = input2;

I don't know if it is a bug or what but i tried and i can use this way. Even if i don't do the correct array declaration, i still can store it directly.

Actually, i first think of re declaring the same array variable and copy all the previous data into it through pointer. Maybe it will work too but i haven't tried. Maybe i should get some advice from C++ pro.

Well, i hope this can help anyone who read my post.... Haha.

Tuesday, August 11, 2009

Trip to KL part 3

Third day. Kv and I wake up quite early to eat free buffet at the restaurant. U forgot the name. We only can eat there. We can't take food away. However, i bring along a plastic bag to take some food away for Kazel and her friend. Her friend name is Chat Kit.

Then of course, we went to play at theme park.

I don't know what this called. However, this is very exciting. Fun and a bit nervous when i was on the top. Shout all the way i could.

Ready to take off......

AH!!!!!!!!!!!!!!!!!!!!!

Next, we went to this chocolate wonderland. Actually, nothing special inside. Just that it got sell a lot of chocolate.


Boat riding. Busy moving the boat so i am not looking at the camera.


Lovely Kv blew by wind. Hope the crocodile roof won't collapse.


Aiyo, where you touch oh?


Look at camera please! Haha. We are waiting in a queue for dinosaur viewing.


On a boat to dinosaur land.


It's good to be a kid.


There, right side that one is Chat Kit.


Lastly, when we are waiting for something. Forgot what are we waiting for that time.


We went to play roller coaster, dragon type and old type. All is exciting. I played almost all of the theme park games except Go Kart....grrr...i want to play that one so much. LOL!

I have no more picture onward.

So this is the last post of KL trip.

At the next day, we went to Snow world and capture some nice picture. They output the picture and we buy all of them. All of them is....RM81....so dam expensive. I can say, the snow world is so dam cold. About -4 degree celcius. However, Kv and I didn't wear any trouser. I wear pants that only until my knee and Kv wear short skirt.....Still, we have a lot of fun inside.

So, the next few days, we went down from Genting and go to a lot of shopping complex like Pavillion, Sungei Wang and Time Square. However, i buy nothing from there....LOL!

Monday, August 3, 2009

Trip to KL part 2

Second day, 23 July 2009. We woke up at about 7.30....(actually 8am) and went to a station(donno what station...monorail or LRT)
We take that "vehicle"....to Titiwangsa....i also not sure.
Then went all the way to KL sentral and we need to take bus to KL sentral to Genting. We plan to use cable car to Genting from midway which take about 15 minutes. And we need to use bus to get to the midway of Genting.

In the end, we end up using taxi to the midway of Genting because there are a group of people also using taxi but the group is in 6 people. Add 2 of us, we have 8 people and we use 2 taxi going up. This way, we can save some money by sharing the taxi fees.

In the midway...where we will take the cable car....

We saw this, a chocolate house. Nice huh. Not very big. Just about the size of a small cupboard.


Then we went to take cable car and this is the picture where we leave the cable car station. The station become smaller and smaller. Then we are surrounded by a jungle...or forest.

We arrived Genting but we don't know where is the hotel. We search following the notice board.

Finally we arrive at the hotel at about 11.55am. I asked what time we can check in as we already book the room. The receptionist said we can check in at about 1pm. So Kv and I sat at sofa and wait.

We are so tired and we hope to lie on a bed as soon as possible. Hence, at 12.30pm, i asked the receptionist again. He said he can prepare a room for us in 5 minutes like that and gave us a key.

We went to search for our room.....well, need to walk for about 2-3 minutes to arrive because it is so far....

We arrived and i was so tired. I lie on bed and rest. However Kv complain the room is not beautiful, no bathtub and so on....I don't care so much because i think it is good enough already. 2 big bed....electric kettle, tv and cupboard. Not good enough? Maybe....

I went to look at the scenery behind the room.
Only a forest.....full of tree and ....cloud.


She fall asleep so quickly....then i just watch tv. There is a nice cantonese movie. I don't know the title but the story is nice.


Wah, whose leg is that....got white and black.


At night, of course we went to play. We go to play some arcade game.
Actually, this machine is broken. So we can win about 100-150 ticket easily using 3 token. Hahaha.


When it come out, it will arrange itself...sometimes only...
Some people have a thick coupon. They might get few thousand point by that.


We put the coupon into the machine that count the point. 1 coupon = 1 point. We have a lot and many people look at us behind us. So proud...haha.


Actually not a lot la. Only 743 coupon. 743 point cannot change any good thing. A towel already need about 1000 point. LOL!


Then we go walk walk and take some more picture at Genting.


Lazy to describe, see yourself. Hahaha.

you asked why there is no my picture? Haha, next post will have some. Don't worry.

to be continued....