'프로그램 사용 > sketchup' 카테고리의 다른 글
| sketchup flip 하기 (0) | 2016.08.31 |
|---|---|
| sketchup 여러번 복사하기 (0) | 2016.08.31 |
| 스케치업 / export to DWG (0) | 2014.02.04 |
| 스케치업 튜토리얼 (0) | 2014.02.04 |
| 스케치업 그림자 만들기 (0) | 2014.02.04 |
| sketchup flip 하기 (0) | 2016.08.31 |
|---|---|
| sketchup 여러번 복사하기 (0) | 2016.08.31 |
| 스케치업 / export to DWG (0) | 2014.02.04 |
| 스케치업 튜토리얼 (0) | 2014.02.04 |
| 스케치업 그림자 만들기 (0) | 2014.02.04 |
| try - throw - catch (0) | 2014.03.05 |
|---|---|
| 연산자 오버로딩 (0) | 2014.03.04 |
| c++ class / const member variable & function (0) | 2014.02.28 |
| deep copy / shallow copy < object copy (0) | 2014.02.27 |
| crt0.o / crtexe.obj (0) | 2014.02.27 |
| constructor(variables ...) : const variable(parameter) |
| class class_name { const int key; // const member variable class_name(int _key) : key(_key) { } }; |
class student
{
const int id;
int age;
char name[20];
char subject[30];
public:
student()
{
}
student(int _id) : id(_id)
{
}
student(int _id, int _age, char *_name, char *_subject) : id(_id)
{
age = _age;
// id = _id;
strcpy(name, _name);
strcpy(subject, _subject);
}
| 1>d:\cpp\ch12\ch12\ch12.cpp(13): error C2758: 'student::id' : 생성자 기본/멤버 이니셜라이저 목록에 초기화해야 합니다.
1> d:\cpp\ch12\ch12\ch12.cpp(7) : 'student::id' 선언을 참조하십시오.
1>d:\cpp\ch12\ch12\ch12.cpp(44): error C2582: 'operator =' 함수는 'student'에서 사용할 수 없습니다. |
| ret_type function(parameter ...) const |
| 연산자 오버로딩 (0) | 2014.03.04 |
|---|---|
| c++ explicit (0) | 2014.02.28 |
| deep copy / shallow copy < object copy (0) | 2014.02.27 |
| crt0.o / crtexe.obj (0) | 2014.02.27 |
| c++ constructor (0) | 2014.02.26 |
| c++ explicit (0) | 2014.02.28 |
|---|---|
| c++ class / const member variable & function (0) | 2014.02.28 |
| crt0.o / crtexe.obj (0) | 2014.02.27 |
| c++ constructor (0) | 2014.02.26 |
| C++11 Lambda Fuction (2) | 2013.11.20 |
| 1> LINK : D:\cpp\ch9\Debug\ch9.exe을(를) 찾을 수 없거나 마지막 증분 링크에 의해 빌드되지 않았습니다. 전체 링크를 수행하고 있습니다.
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: _main 외부 기호(참조 위치: ___tmainCRTStartup 함수)에서 확인하지 못했습니다.
1>D:\cpp\ch9\Debug\ch9.exe : fatal error LNK1120: 1개의 확인할 수 없는 외부 참조입니다.
========== 빌드: 성공 0, 실패 1, 최신 0, 생략 0 ========== |
| c++ class / const member variable & function (0) | 2014.02.28 |
|---|---|
| deep copy / shallow copy < object copy (0) | 2014.02.27 |
| c++ constructor (0) | 2014.02.26 |
| C++11 Lambda Fuction (2) | 2013.11.20 |
| C++ AMP (Accelerated Massive Parallelism) (0) | 2013.10.08 |
#include < iostream >
using namespace std;
class test
{
int a1, a2;
int a;
public:
test()
{
}
test(int b)
{
cout << "constructor called" << endl;
a = b;
}
void dump()
{
cout << a1 << ' ' << a2 << ' ' << a << endl;
}
};
void main()
{
cout << "tt" << endl;
test tt;
cout << "t2(11)" << endl;
test t2(11);
cout << "tt = 11" << endl;
tt = 11;
cout << "tt = 55" << endl;
tt = 55;
tt.dump();
t2.dump();
}| tt
t2(11)
constructor called
tt = 11
constructor called
tt = 55
constructor called
-858993460 -858993460 55
-858993460 -858993460 11 |
1>error C2679: 이항 '=' : 오른쪽 피연산자로 'int' 형식을 사용하는 연산자가 없거나 허용되는 변환이 없습니다.
1> 'test &test::operator =(const test &)'일 수 있습니다.
1> 인수 목록 '(test, int)'을(를) 일치시키는 동안 |
| deep copy / shallow copy < object copy (0) | 2014.02.27 |
|---|---|
| crt0.o / crtexe.obj (0) | 2014.02.27 |
| C++11 Lambda Fuction (2) | 2013.11.20 |
| C++ AMP (Accelerated Massive Parallelism) (0) | 2013.10.08 |
| c++ class - friend (0) | 2013.03.15 |
| int main()
{
const int a = 0;
int *p;
p = &a;
printf("%d %d\n",a,*p);
*p = 2;
// a = 1;
printf("%d %d\n",a,*p);
return 0;
} |
| $ ./a.out
0 0
2 2
|
| 1> error C2440: '=' : 'const int *'에서 'int *'(으)로 변환할 수 없습니다. 1> 변환하면서 한정자가 손실됩니다. |
| const int const *p1; 1> warning C4114: 동일한 형식 한정자를 두 번 이상 사용했습니다. |
| 2중 포인터 사용이유 (0) | 2014.03.19 |
|---|---|
| typeof (0) | 2014.03.11 |
| assert() (0) | 2013.12.18 |
| printf의 %s와 %S (0) | 2013.06.15 |
| win32api - joystick 예제 (0) | 2013.06.15 |
| ATC 2급 2전 1패 1승!! (2) | 2014.03.17 |
|---|---|
| 끄아아 내 6만원 ㅠㅠ 아니 12만원? (0) | 2014.03.03 |
| ATC 2급 시험 (0) | 2014.02.22 |
| 날릴 가능성이 조금 더 높지만.. 등록! (0) | 2014.02.18 |
| 연봉이 먼지... (4) | 2014.02.16 |
| 간만에 마비노기 ㅋㅋ (0) | 2014.06.11 |
|---|---|
| 마비노기 + 소드 아트 온라인 콜라보 ㄷㄷㄷ (0) | 2014.05.23 |
| 나오의 산타복!!!! +_+ (2) | 2013.12.26 |
| 마비노기 설문이 날아왔다. (2) | 2013.07.22 |
| 엌ㅋ 정말 마비노기 망하려나 ㅋㅋㅋㅋ (4) | 2013.07.14 |
| 끄아아 내 6만원 ㅠㅠ 아니 12만원? (0) | 2014.03.03 |
|---|---|
| 솔데스크 C언어 통합 1일차 (0) | 2014.02.24 |
| 날릴 가능성이 조금 더 높지만.. 등록! (0) | 2014.02.18 |
| 연봉이 먼지... (4) | 2014.02.16 |
| 내일 배움 카드.. 아오 힘들다 -_- (2) | 2014.01.22 |