블로그 이미지
JoyfulLife

공지사항

최근에 받은 트랙백

글 보관함

calendar

        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  

'ArrayList'에 해당되는 글 1

  1. 2010.11.08 Using Arraylist with Object

Using Arraylist with Object

2010.11.08 23:47 | Posted by JoyfulLife
I'm not good at C++.  I'm a Java developer. Java is easier than C++.

Here is what I had problem yesterday.

I made class RecommendItem. And I wanted this to add ArrayList.

When I use Java, that's very easy.

clase RecommendItem
{
}

ArrayList<RecommendItem> a=new ArrayList<RecommendList>();
a.add(new RecommendItem);

that's it.

but C++..

class RecommendItem : public Object
{
}
.h, and *.cpp.

ArrayList *t=new ArrayList;
t->Consturct();

t->Add(*(new RecommendItem()));


I don't like Pointer. I didn't wrote public Object. So t->Add(*(new Recommend())).. this line was wrong.. because in bada, the class that have to be Add() must inherite Object.

If you want to ArrayList , Don't forget to inherit Object.

Don't bet on bada will be successed . You should load up on C++. Don't egg on your friend to study Bada.

Bada have to be upgrade many times.

신고

'Bada' 카테고리의 다른 글

Using Arraylist with Object  (0) 2010.11.08
To get all contact in the Bada  (0) 2010.10.26
bada 에서 핸드폰 전화번호 알아내기.  (0) 2010.10.25
바다에서 post 사용하기  (0) 2010.10.16
Bada 1.1.0b1 공개  (0) 2010.10.12
Bada 에서 Json 사용  (0) 2010.10.03
이전 1 다음

티스토리 툴바