- MoreEffectiveC++/Techniques2of3 . . . . 158 matches
String(const char *value = "");
String& operator=(const String& rhs);
String& String::operator=(const String& rhs)
StringValue(const char *initValue);
String::StringValue::StringValue(const char *initValue): refCount(1)
String(const char *initValue = "");
String(const String& rhs);
String::String(const char *initValue): value(new StringValue(initValue))
String::String(const String& rhs): value(rhs.value)
다음에 구현해야할 사항은 할당(assignment)관련한 구현 즉 operator= 이다. 복사 생성자(copy constructor)를 호출이 아닌 할당은 다음과 같이 선언되고,
String& operator=(const String& rhs);
String& String::operator=(const String& rhs)
const char& operator[](int index) const; // const String에 대하여
char& operator[](int index); // non-const String에 대하여
const String에 대한 값을 주는 것은 아래와 같이 간단히 해결된다. 내부 값이 아무런 영향을 받을 것이 없을 경우이기 떄문이다.
const char& String::operator[](int index) const
하지만 non-const의 operator[]는 이것(const operator[])와 완전히 다른 상황이 된다. 이유는 non-const operator[]는 StringValue가 가리키고 있는 값을 변경할수 있는 권한을 내주기 때문이다. 즉, non-const operator[]는 자료의 읽기(Read)와 쓰기(Write)를 다 허용한다.
참조 세기가 적용된 String은 수정할때 조심하게 해야 된다. 그래서 일단 안전한 non-const operator[]를 수행하기 위하여 아예 operator[]를 수행할때 마다 새로운 객체를 생성해 버리는 것이다. 그래서 만든 것이 다음과 같은 방법으로 하고, 설명은 주석에 더 자세히
char& String::operator[](int index) // non-const operator[]
String의 복사 생성자는 이러한 상태를 감지할 방법이 없다. 위에서 보듯이, s2가 참고할수 있는 정보는 모두 s1의 내부에 있는데, s1에게는 non-const operator[]를 수행하였는지에 관한 기록은 없다.
- 경시대회준비반/BigInteger . . . . 143 matches
const char *BigIntErrDes[] = { "Allocation Failed", "Overflow","Underflow", "Invalid Integer", "Divide by Zero" ,"Domain Error"};
const char BigIntPROGRAMNAME[] = { "BigInteger" };
const int BigIntMajorVersion = 6;
const int BigIntMinorVersion = 7;
const int BigIntRevision = 25;
void Dump(const char *,enum BigMathERROR);
string& DumpString (char const*,enum BigMathERROR);
const DATATYPE BASE = 10000;
const DATATYPE INVALIDDATA = 65535U;
const SizeT LOG10BASE = 4;
// Constructor with specified bytes
void datacopy(BigInteger const&,SizeT);
SizeT datalen(DATATYPE const*) const;
// Default Constructor
// Long integer constructor
// Character array constructor
BigInteger(char const*);
// Copy Constructor
BigInteger(BigInteger const&);
int UnsignedCompareTo(BigInteger const&)const;
- MoreEffectiveC++/Efficiency . . . . 121 matches
cosnt string& field1() const; // 필드상의 값1
int field2() const; // 필드상의 값2
double field3() const; // ...
const string& field4() const;
const string& field5() const;
const string& field1() const;
int field2() const;
double field3() const;
const string& field4() const;
const string& LargeObject::field() const
'''lazy fetching'''을 적용 하면, 당신은 반드시 field1과 같은 const멤버 함수를 포함하는 어떠한 멤버 함수에서 실제 데이터 포인터를 초기화하는 과정이 필요한 문제가 발생한다.(const를 다시 재할당?) 하지만 컴파일러는 당신이 const 멤버 함수의 내부에서 데이터 멤버를 수정하려고 시도하면 까다로운(cranky) 반응을 가진다. 그래서 당신은 "좋와, 나는 내가 해야 할것을 알고있어" 말하는 방법을 가지고 있어야만 한다. 가장 좋은 방법은 포인터의 필드를 mutable로 선언해 버리는 것이다. 이것의 의미는 어떠한 멤버 함수에서도 해당 변수를 고칠수 있다는 의미로, 이렇게 어떠한 멤버 함수내에서도 수행할수 있다. 이것이 LargeObject안에 있는 필드들에 mutable이 모두 선언된 이유이다.
mutable 키워드는 최근에 C++에 추가되어서, 당신의 벤더들이 아직 지원 못할 가능성도 있다. 지원하지 못한다면, 당신은 또 다른 방법으로 컴파일러에게 const 멤버 함수 하에서 데이터 멤버들을 고치는 방안이 필요하다. 한가지 가능할 법인 방법이 "fake this"의 접근인다. "fake this"는 this가 하는 역할처럼 같은 객체를 가리키는 포인터로 pointer-to-non-const(const가 아닌 포인터)를 만들어 내는 것이다. (DeleteMe 약간 이상) 당신이 데이터 멤버를 수정하기를 원하면, 당신은 이 "fake this" 포인터를 통해서 수정할수 있다.:
const string& field1() const; // 바뀌지 않음
const string& LargeObject::field1() const
// 자 이것이 fake This 인데, 저 포인터로 this에 대한 접근에서 const를 풀어 버리는 역할을 한다.
// LargeObject* 하고 const가 뒤에 붙어 있기 때문에 LargeObject* 자체는 const가 아닌 셈이다.
LargeObject * const fakeThis = const_cast<LargeObject* const>(this);
fakeThis->field1Value = // fakeThis 가 const가 아니기 때문에
이 함수는 *this의 constness성질을 부여하기 위하여 const_cast(Item 2참고)를 사용했다.만약 당신이 const_cast마져 지원 안하면 다음과 같이 해야 컴파일러가 알아 먹는다.
const string& LargeObject::field1() const
- EffectiveC++ . . . . 102 matches
=== Item1: Prefer const and inline to #define ===
DeleteMe #define(preprocessor)문에 대해 const와 inline을(compile)의 이용을 추천한다. --상민
[#define -> const][[BR]]
const double ASPECT_RATIO = 1.653
1. 상수 포인터(constant pointer)를 정의하기가 다소 까다로워 진다는 것.
const char * const authorName = "Scott Meyers";
static const int NUM_TURNS = 5; // 상수 선언! (선언만 한것임)
const int GamePlayer::NUM_TURNS; // 정의를 꼭해주어야 한다.
inline const T& max (const T& a, const T& b) { return a > b ? a : b; }
const와 inline을 쓰자는 얘기였습니다. --; 왜 그런지는 아시는 분께서 글좀 남기시구요. ^^[[BR]]
#define 문을 const와 inline으로 대체해서 써도, #ifdef/#ifndef - #endif 등.. 이와 유사한 것들은 [[BR]]
매크로는 말 그대로 치환이기 때문에 버그 발생할 확률이 높음. 상수선언이나 함수선언같은 경우는 가급적 const 나 inline으로 대체하는게 좋겠지. (으.. 그래도 실제로 짤때는 상수 선언할때는 #define 남용 경향이..[[BR]]
* ''생성자(constructor)와 소멸자(destructor)의 존재를 모른다.''
* ''Initialization of the pointer in each of the constructors. If no memory is to be allocated to the pointer in a particular constructor, the pointer should be initialized to 0 (i.e., the null pointer). - 생성자 각각에서 포인터 초기화''
== Constructors, Destructors, and Assignment Operators (클래스에 관한것들.) ==
=== Item 11: Declare a copy constructor and an assignment operator for classes with dynamically allocated memory ===
String(const char *value);
String::String(const char *value)
=== Item 12: Prefer initialization to assignment in constructors ===
NamedPtr(const string& initName, T *initPtr);
- MoreEffectiveC++/Techniques1of3 . . . . 84 matches
== Item 25: Virtualizing constructors and non-member functions ==
=== Virtual Constructor : 가상 생성자 ===
가상 생성자의 방식의 한 종류로 특별하게 가상 복자 생성자(virtual copy constructor)는 널리 쓰인다. 이 가상 복사 생성자는 새로운 사본의 포인터를 반환하는데 copySlef나 cloneSelf같은 복사의 개념으로 생성자를 구현하는 것이다. 다음 코드에서는 clone의 이름을 쓰였다.
// 가상 복사 생성자 virtual copy constructor 선언
virtual NLComponent * clone() const = 0;
virtual TextBlock * clone() const // 가상 복사 생성자 선언
virtual Graphic * clone() const // 가상 복사 생성자 선언
NewsLetter(const NewsLetter* rhs); // NewsLetter의 복사 생성자
NewsLetter::NewsLetter(const NewsLetter* rhs)
for (list<NLComponent*>::constiterator it = rhs.components.begin();
virtual ostream& operator<<(ostream& str) const = 0;
virtual ostream& operator<<(ostream& str) const;
virtual ostream& operator<<(ostream& str) const;
virtual ostream& print(ostream& s) const = 0;
virtual ostream& print(ostream& s) const;
virtual ostream& print(ostream& s) const;
ostream& operator<<(ostream& s, const NLComponent& c)
CantBeInstantiated(const CantBeInstantiated&);
void submitJob(const PrintJob& job);
Printer(const Printer& rhs);
- AcceleratedC++/Chapter11 . . . . 83 matches
vector<Student_info>::const_iterator b, e;
=== 11.2.2 생성자(Constructor) ===
Vec<Student_info> vs; // default constructor
explicit Vec(size_type n, const T& val = T()) { create(n, val); }
'''const_iterator, iterator'''를 정의해야함.
typedef const T* const_iterator;
explicit Vect(size_type n, const T& val = T()) { create(n, val); }
typedef const T* const_iterator;
explicit Vect(size_type n, const T& val = T()) { create(n, val); }
size_type size() const { return limit - data; }
const T& operator[](size_type i) const { return data[i]; }; // 이경우에도 레퍼런스를 쓰는 이유는 성능상의 이유때문이다.
모든 멤버함수는 암묵적으로 한가지의 인자를 더 받는다. 그것은 그 함수를 호출한 객체인데, 이경우 그 객체가 const이거나 const 가 아닌 버전 2가지가 존재하는 것이 가능하기 때문에 parameter specification 이 동일하지만 오버로딩이 가능하다.
typedef const T* const_iterator;
explicit Vect(size_type n, const T& val = T()) { create(n, val); }
size_type size() const { return limit - data; }
const T& operator[](size_type i) const { return data[i]; }; // 이경우에도 레퍼런스를 쓰는 이유는 성능상의 이유때문이다.
const_iterator begin() const { return data; }
const_iterator end() const { return limit; }
'''implicit copy constructor'''
d = median (vi); // copy constructor work
- RandomWalk2/Insu . . . . 63 matches
const int MAXCOURSE = 100;
const int MAXCOURSE = 100;
RandomWalkBoard(int nRow, int nCol, int DirectX[], int DirectY[], const Roach& roach);
void ShowStatus() const;
bool CheckCompletelyPatrol() const;
bool CheckEndCourse() const;
const string& GetCourse() const;
int GetCurRow() const;
int GetCurCol() const;
void CheckDirectionAndMove(const vector<int>& X, const vector<int>& Y, int nRow, int nCol, int direction);
int GetTotalVisitCount() const;
RandomWalkBoard::RandomWalkBoard(int nRow, int nCol, int DirectX[], int DirectY[], const Roach& roach) : _Roach(roach)
void RandomWalkBoard::ShowStatus() const
bool RandomWalkBoard::CheckCompletelyPatrol() const
bool RandomWalkBoard::CheckEndCourse() const
const string& Roach::GetCourse() const
int Roach::GetCurRow() const
int Roach::GetCurCol() const
int Roach::GetTotalVisitCount() const
void Roach::CheckDirectionAndMove(const vector<int>& X, const vector<int>& Y, int nRow, int nCol, int direction)
- AcceleratedC++/Chapter14 . . . . 61 matches
Handle(const Handle& s) : p(0) { if (s.p) p = s.p->clone(); } // 복사 생성자는 인자로 받은 객체의 clone() 함수를 통해서 새로운 객체를 생성하고 그 것을 대입한다.
Handle& operator=(const Handle&);
operator bool() const { return p; }
T& operator*() const;
T* operator->() const;
template<class T> Handle<T>& Handle<T>::operator=(const Handle& rhs) {
template<class T> T& Handle<T>::operator*() const {
template<class T> T* Handle<T>::operator->() const {
bool compare_Core_handles(const Handle<Core>& lhs, const Handle<Core>& rhs) {
// `compare' must be rewritten to work on `const Handle<Core>&'
std::string name() const {
double grade() const {
static bool compare(const Student_info& s1,
const Student_info& s2) {
Ref_handle(const Ref_handle& h): p(h.p), refptr(h.refptr) {
Ref_handle& operator=(const Ref_handle&);
operator bool() const { return p; }
T& operator*() const {
T* operator->() const {
Ref_handle<T>& Ref_handle<T>::operator=(const Ref_handle& rhs)
- [Lovely]boy^_^/3DLibrary . . . . 58 matches
const float PI = (float)(atan(1.0) * 4.0);
Matrix(const Matrix& m);
Matrix operator + (const Matrix& m) const;
Matrix operator - (const Matrix& m) const;
Matrix operator - () const;
Matrix operator * (const Matrix& m) const;
Vector operator * (const Vector& v) const;
Matrix operator * (float n) const;
friend ostream& operator << (ostream& os, const Matrix& m);
friend Matrix operator * (float n, const Matrix& m);
Vector(const Vector& v);
float operator * (const Vector& v) const;
Vector operator * (float n) const;
Vector operator ^ (const Vector& v) const;
Vector operator - () const;
Vector operator + (const Vector& v) const;
Vector operator - (const Vector& v) const;
Vector Normalize() const;
float GetMag() const;
friend ostream& operator << (ostream& os, const Vector& v);
- MoreEffectiveC++/Exception . . . . 57 matches
일단 여러분은 파일에서 부터 puppy와 kitten와 키튼의 정보를 이렇게 읽고 만든다. 사실 Item 25에 언급할 ''virtual constructor''가 제격이지만, 일단 우리에 목적에 맞는 함수로 대체한다.
void displayIntoInfo(const Information& info)
WindowHandle(const WindowHandle&);
WindowHandle& operator=(const WindowHandle);
void displayIntoInfo(const Information& info)
== Item 10: Prevent resource leaks in constructors. ==
Image(const string& imageDataFileName);
AudioClip(const string& audioDataFileName);
BookEntry(const string& name,
const string& address = "",
const string& imageFileName = "",
const string& audioClipFileName = "");
void addPhoneNumber(const PhoneNumber& number);
BookEntry::BookEntry(const string& name,
const string& address,
const string& imageFileName,
const string& audioClipFileName)
BookEntry::BookEntry(const string& name,
const string& address,
const string& imageFileName,
- C/C++어려운선언문해석하기 . . . . 53 matches
다루겠습니다. 우리가 매일 흔히 볼 수 있는 선언문을 비롯해서 간간히 문제의 소지를 일으킬 수 있는 const 수정자와 typedef 및 함수
[[ const modifier ]]
const 수정자는 변수가 변경되는 것을 금지 (변수 <-> 변경할 수 없다? 모순이군요 ) 하기 위해서 사용하는 키워드입니다. const 변수
const int n = 5;
int const m = 10;
위의 예제의 두 변수 n과 m은 똑같이 const 정수형으로 선언되었습니다. C++ 표준에서 두가지 선언이 모두 가능하다고 나와있습니만 개
인적으로는 const가 강조되어서 의미가 더 분명한 첫번째 선언문을 선호합니다.
const가 포인터와 결합되면 조금 복잡해집니다. 예를 들어서 다음과 같은 변수 p, q가 선언되었습니다.
const int *p;
int const *q;
그럼 여기서 퀴즈, const int형을 가리키는 포인터와 int형을 가리키는 const 포인터를 구별해보세요.
사실 두 변수 모두 const int를 가리키는 포인터입니다. int 형을 가리키는 const 포인터는 다음과 같이 선언됩니다.
int * const r = &n; // n 은 int형 변수로 선언 되었슴
위에서 p와 q는 const int형 변수이기 때문에 *p 나 *q의 값을 변경할 수 없습니다. r은 const 포인터이기 때문에 일단 위와 같이 선언
위에서 나온 두 가지 선언문을 결합하여 const int 형을 가리키는 const 포인터를 선언하려고 하면 다음과 같습니다.
const int * const p = &n; // n은 const int형 변수로 선언되었슴
다음에 나열한 선언문들을 보시면 const를 어떻게 해석할 수 있는지 더 분명하게 아실 수 있을겁니다. 이 중에 몇몇 선언문은 선언하면
const char **p2; // pointer to pointer to const char
char * const * p3; // pointer to const pointer to char
const char * const * p4; // pointer to const pointer to const char
- AcceleratedC++/Chapter9 . . . . 39 matches
double grade() const; //내부 멤버변수를 활용하여 점수를 계산하고 double 형으로 리턴한다.
//함수 명의 뒤에 const를 붙이면 멤버 변수의 변형을 할 수 없는 함수가 된다. (구조적으로 좋다)
double Student_info::grade() const {
객체에서는 const 객체 내부의 데이터들을 const형으로 다룰 수는 없지만, 멤버함수를 const 멤버함수로 만듦으로써 변형에 제한을 줄 수 있다.
* const 객체에 대해서는 const 멤버함수가 아닌 함수는 호출 할 수 없다.
double grade() const;
double grade() const;
dobule grade() const;
double grade() const;
dobule grade() const;
double grade() const;
std::string name() const {return n;}
name 멤버 변수에 직접적으로 접근하는 대신에 name()함수를 만들어서 접근하도록 만들었다. const 함수이므로 멤버변수의 변경을 불허한다. 리턴값이 복사된 것이기 때문에 변경을 하더라도 멤버변수에 영향을 주지는 않는다.
bool compare(const Student_info& x, const Student_info& y) {
double grade() const;
std::string name() const {return n;}
bool valid() const { return !homework.empty(); } // 사용자에게 그 객체가 유효한 데이터를 가졌는지를 알려준다.
double grade() const;
std::string name() const {return n;}
bool valid() const { return !homework.empty(); } // 사용자에게 그 객체가 유효한 데이터를 가졌는지를 알려준다.
- OurMajorLangIsCAndCPlusPlus/stdio.h . . . . 39 matches
|| FILE * fdopen(int, const char *) || 파일 지정자 필드로 부터 스트림을 얻습니다. ||
|| FILE * fopen(const char *, const char *) || 파일을 연다. ||
|| int fprintf(FILE *, const char *, ...) || 해당 스트림에 문자열을 기록한다. ||
|| int fputs(const char *, FILE *) || 해당 스트림에 문자열을 기록한다. ||
|| FILE * freopen(const char *, const char *, FILE *) || 세번째 인자의 스트림을 닫고 그 포인터를 첫번째 인자의 파일으로 대체한다. ||
|| int fscanf(FILE *, const char *, ...) || 해당 파일에서 문자열을 지정한 형식으로 읽어들인다. ||
|| int fsetpos(FILE *, const fpos_t *) || 해당 스트림의 포인터를 지정한 위치로 옮긴다. ||
|| size_t fwrite(const void *, size_t, size_t, FILE *) || 해당 내용을 두번째 인자의 크기만큼, 세번째 인자의 횟수로 스트림에 기록한다. ||
|| void perror(const char *) || 마지막 에러에 대한 오류메시지를 출력한다. ||
|| int printf(const char *, ...) || 해당 형식의 문자열을 출력한다. ||
|| int puts(const char *) || 표준 입출력으로 한줄을 출력한다. ||
|| int remove(const char *) || 해당 파일을 삭제한다. 성공시 0, 실패시 -1을 리턴한다. ||
|| int rename(const char *, const char *) || 첫번째 인자의 파일을 두번째 인자의 이름으로 바꾸어준다. ||
|| int scanf(const char *, ...) || 표준 입출력에서 해당 형식으로 입력 받는다. ||
|| int sprintf(char *, const char *, ...) || 해당 버퍼에 지정한 형식대로 출력한다. ||
|| int sscanf(const char *, const char *, ...) || 해당 문자열에서 지정된 형식대로 입력받는다. ||
|| int vfprintf(FILE *, const char *, va_list) || 해당 스트림에 인수리스트를 이용해서 지정된 형식의 문자열을 삽입한다. ||
|| int vprintf(const char *, va_list) || 표준 입출력에 인수리스트를 이용해서 지정된 형식의 문자열을 출력한다. ||
|| int vsprintf(char *, const char *, va_list) || 해당 문자열에 인수리스트를 이용해서 지정된 형식의 문자열을 기록한다. ||
|| int fputws(const wchar_t *, FILE *) || 해당 스트림으로 유티코드 문자열을 기록한다. ||
- OurMajorLangIsCAndCPlusPlus/string.h . . . . 38 matches
|| void * memcpy(void * dest, const void * scr, size_t count) || Copies characters between buffers. ||
|| void * memccpy(void * dest, const void * scr, int c, unsigned int count) || Copies characters from a buffer. ||
|| void * memmove(void * dest, const void * scr, size_t count) || Moves one buffer to another. ||
|| int memcmp(const void * buf1, const void * buf2, size_t count) || Compare characters in two buffers. ||
|| int memicmp(const void * buf1, const void * buf2, unsigned int count) || Compares characters in two buffers (case-insensitive). ||
|| void * memchr(const void * buf, int c, size_t count) || Finds characters in a buffer. ||
|| char * strcpy(char * strDestination , const char * strSource ) || Copy a string. ||
|| char * strncpy(char * strDestination, const char * strSource, size_t count) || Copy characters of one string to another ||
|| char * strcat(char * strDestination, const char * strSource) || Append a string. ||
|| char * strncat(char * strDestination, const char * strSource, size_t count) || Append characters of a string. ||
|| int strcmp(const char *stirng1, const char *string2) || Compare strings. ||
|| int strcmpi(const char *stirng1, const char *string2) || Compares two strings to determine if they are the same. The comparison is not case-sensitive. ||
|| int stricmp(const char *stirng1, const char *string2) || Perform a lowercase comparison of strings. ||
|| int strncmp(const char *string1, const char *string2, size_t count) || Compare characters of two strings. ||
|| int strnicmp(const char *string1, const char *string2, size_t count) || Compare characters of two strings without regard to case. ||
|| size_t strlen(const char *string) || Get the length of a string. ||
|| int strcoll(const char * stirng1, const char * stirng2) || Compare strings using locale-specific information. ||
|| char * strchr(const char *string, int c) || Find a character in a string. ||
|| char * strrchr(const char *string, int c) || Scan a string for the last occurrence of a character. ||
|| size_t strcspn(const char *string, const char *strCharSet) || Find a substring in a string. ||
- MoreEffectiveC++/Miscellany . . . . 37 matches
Animal& operator=(const Animal& rhs);
Lizard& operator=(const Lizard& rhs);
Chicken& operator=(const Chicken& rhs);
virtual Animal& operator=(const Animal& rhs);
virtual Lizard& operator=(const Animal& rhs);
virtual Chicken& operator= (const Animal& rhs);
Lizard& Lizard::operator=(const Animal& rhs)
const Lizard& rhs_liz = dynamic_cast<const Lizard&>(rhs);
virtual Lizard& operator=(const Animal& rhs);
Lizard& operator=(const Lizard& rhs); // 더한 부분
liz1 = liz2; // const Lizard&를 인자로 하는 operator= 호출
*pAnimal1 = *pAnimal2; // const Ainmal&인자로 가지는 operator= 연산자 호출
const Animal&을 인자로 하는 연산자의 구현은 구현은 간단한다.
Lizard& Lizard::operator=(const Animal& rhs)
return operator=(dynamic_cast<const Lizard&>(rhs));
Animal& operator=(const Animal& rhs); // 사역(private)이다.
Lizard& operator=(const Lizard& rhs);
Chicken& operator=(const Chicken& rhs);
Lizard& Lizard::operator=(const Lizard& rhs)
AbstractAnimal& operator=(const AbstractAnimal& rhs);
- AcceleratedC++/Chapter6 . . . . 34 matches
vector<string> split(const string& str)
typedef string::const_iterator iter;
bool isPalindrome(const string& s)
std::vector<std::string> find_urls(const std::string& s);
string::const_iterator url_end(string::const_iterator, string::const_iterator);
string::const_iterator url_beg(string::const_iterator, string::const_iterator);
vector<string> find_urls(const string& s)
typedef string::const_iterator iter;
string::const_iterator url_end(string::const_iterator b, string::const_iterator e)
static const string url_ch = "~;/?:@=&$-_.+!*'(),";
string::const_iterator url_beg(string::const_iterator b, string::const_iterator e)
static const string sep = "://";
typedef string::const_iterator iter;
bool did_all_hw(const Student_info& s)
double median_anlysis(const vector<Strudent_info>& students)
double grade_aux(const Student_info& s)
double median_anlysis(const vector<Strudent_info>& students)
void write_analysis(ostream& out, const string& name,
double analysis(const vector<Student_info>&),
const vector<Student_infor>& did,
- SuperMarket/인수 . . . . 33 matches
Goods(const string& name, int cost) : _name(name), _cost(cost) {}
const string& getName() const
int getCost() const
Packages(const Goods& good, int count) : _good(good), _count(count) {}
const Goods& getGoods() const
int getCount() const
void showMenu() const
void sellGoods(const Goods& goods, int count)
int getRestMoney() const
const vector<Goods>& getGoods() const
void answerCost(const string& goodsName) const
const Goods& findGoods(const string& goodsName) const
void depositMoney(SuperMarket& sm, int money) const
void buyGoods(SuperMarket& sm, const Goods& goods, int count)
void cancleGoods(SuperMarket& sm, const Goods& goods, int count)
virtual void executeCommand(SuperMarket& sm, User& user, const string& str) = 0;
static int getToken(const string& str, int nth)
void executeCommand(SuperMarket& sm, User& user, const string& str)
void executeCommand(SuperMarket& sm, User& user, const string& str)
void executeCommand(SuperMarket& sm, User& user, const string& str)
- AcceleratedC++/Chapter7 . . . . 32 matches
for (std::map<string, int>::const_iterator it = counters.begin();
|| pair || const K || V ||
* Visual C++ 6.0 에서 소스를 컴파일 할때 책에 나온대로 (using namespace std를 사용하지 않고 위와 같이 사용하는 것들의 이름공간만 지정할 경우) map<string, int>::const_iterator 이렇게 치면 using std::map; 이렇게 미리 이름공간을 선언 했음에도 불구하고 에러가 뜬다. 6.0에서 제대로 인식을 못하는것 같다. 위와 같이 std::map<string, int>::const_iterator 이런식으로 이름 공간을 명시하거나 using namespace std; 라고 선언 하던지 해야 한다.
map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split)
for (vector<string>::const_iterator it = words.begin();
for (map<string, vector<int> >::const_iterator it = ret.begin();
vector<int>::const_iterator line_it = it->second.begin(); // it->second == vector<int> 동일 표현
* '''map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split)'''
|| map<string, vector<int> >::const_iterator || K || V ||
vector<string> gen_sentence(const Grammar& g) {
bool bracketed(const string& s) {
void gen_aux(const Grammar& g, const string& word, vector<string>& ret) {
Grammar::const_iterator it = g.find(word); // g[word]로 참조를 할경우 map 컨테이너의 특성상 새로운 map이 생성된다.
const Rule_collection& c = it->second;
const Rule& r = c[nrand(c.size())];
for(Rule::const_iterator i = r.begin(); i != r.end(); ++i)
vector<string>::const_iterator it = sentence.begin();
const int bucket_size = RAND_MAX / n;
void gen_aux(const Grammar&, const string&, vector<string>&);
vector<string> gen_sentence(const Grammar& g)
- AcceleratedC++/Chapter13 . . . . 31 matches
std::string name() const;
double grade() const;
double grade() const;
std::string name() const;
double grade() const;
string Core::name() const { return n; }
double Core::grade() const {
double Grad::grade() const {
bool compare(const Core& c1, const Core& c2) {
bool compare_grade(const Core& c1, const Core& c2) {
virtual double grade() const; // virtual 이 추가됨.
std::string name() const;
virtual double grade() const;
double grade() const;
bool compare(const Core&, const Core&);
bool compare_Core_ptrs(const Core* cp1, const Core* cp2) {
// constructors and copy control
Student_info(const Student_info&);
Student_info& operator=(const Student_info&);
std::string name() const {
- 현종이 . . . . 29 matches
SungJuk(const char *name,int nNumber, int nKorean, int nEnglish, int nMath);
const SungJuk & Top_Avg(const SungJuk &s) const;
const SungJuk & Top_Total(const SungJuk & s) const;
const SungJuk & Top_Korean(const SungJuk & s) const;
const SungJuk & Top_English(const SungJuk & s) const;
const SungJuk & Top_Math(const SungJuk & s) const;
const SungJuk & SungJuk::Top_Avg(const SungJuk &s) const
const SungJuk & SungJuk::Top_Korean(const SungJuk &s) const
const SungJuk & SungJuk::Top_English(const SungJuk &s) const
const SungJuk & SungJuk::Top_Math(const SungJuk &s) const
const int caucse = 10;
- D3D . . . . 28 matches
point3 operator +(point3 const &a, point3 const &b);
point3 operator -(point3 const &a, point3 const &b);
point3 operator *(point3 const &a, float const &b);
point3 operator *(float const &a, point3 const &b);
point3 operator /(point3 const &a, float const &b);
inline float point3::Mag () const
inline float point3::MagSquared () const
inline bool operator ==(point3 const &a, point3 const &b)
inline float operator *(point3 const &a, point3 const &b)
inline point3 operator ^(point3 const &a, point3 const &b)
polygon( const polygon &in )
void CloneData( const polygon &in )
polygon& operator=( const polygon<type> &in )
plane3( const point3& N, float D) : n( N ), d( D )
// Construct a plane from three 3-D points
plane3( const point3& a, const point3& b, const point3& c);
// Construct a plane from a normal direction and a point on the plane
plane3( const point3& norm, const point3& loc);
// Construct a plane from a polygon
plane3( const polygon<point3>& poly );
- AcceleratedC++/Chapter12 . . . . 26 matches
Str(const char* cp) {
클래스는 기본적으로 복사 생성자, 대입 연산자의 기본형을 제공한다. 위의 클래스는 이런 연산에 대한 기본적인 요건을 만족하기 때문에 const char* 가 const Str& 로 변환되어서 정상적으로 동작한다.
상기의 클래스에는 Str(const char*) 타입의 생성자가 존재하기 때문에 이 생성자가 Str 임시 객체를 생성해서 마치 '''사용자 정의 변환(user-define conversion)'''처럼 동작한다.
const char& operator[](size_type i) const { return data[i]; }
이 구현의 세부적인 작동방식은 모두 Vec 클래스로 위임하였다. 대신에 const 클래스와 const 가 아닌 클래스에 대한 버전을 제공하였고, 표준 string 함수와의 일관성 유지를 위해서 string 대신에 char& 형을 리턴하도록 하였음.
std::ostream& operator<<(std::ostream&, const Str&);
ostream& operator<<(ostream& os, const Str& s) {
size_type size() const { return data.size(); }
Str operator+(const Str&, const Str&);
Str& operator+=(const Str& s) {
Str(const char* cp) {
const char& operator[](size_type i) const { return data[i]; }
size_type size() const { return data.size(); }
std::ostream& operator<<(std::ostream&, const Str&);
Str operator+(const Str&, const Str&);
Str operator+(const Str& s, const Str& t) {
char*, const char* 형으로의 변환
operator const char* () const;
- BigBang . . . . 25 matches
* const 멤버 함수의 효과
* move constructor(?)
- 기본 생성자, 복사 생성자(copy constructor), 복사 대입 연산자(copy assignment operator).
==== Chapter 2. #define을 쓰려거든 const, enum, inline을 떠올리자. ====
* #define을 사용하면 컴파일러가 잡아주지 못해서 에러를 발생시킬 가능성이 크다. 그러나 이 말이 #define을 사용하지 말라는 의미는 아니다! 케바케로서 #define이 const보다 맞는 경우도 존재한다.
const int A
const some A
==== Chapter 3. 낌새만 보이면 const를 들이대 보자. ====
const char * p = greeting
char * const p = greeting
const에 의한 상수화를 판단하는 기준은
const char * p = greeting
char const * p = greeting
const iterator a
iterator const a
//-> T * const
const_iterator a
//-> const T *
* const Function이냐 아니냐로도 overloading이 된다.
* 비트 수준 상수성 - 어떤 맴버 함수가 그 객체의 어떤 데이터 맴버도 건드리지 않아야 하지만 그 맴버 함수가 const임을 인정하는 개념.(C++에서는 )
- AcceleratedC++/Chapter10 . . . . 23 matches
void write_analysis(std::ostream& out, const std::string& name,
double analysis(const std::vector<Student_info>&),
const std::vector<Student_info>& did,
const std::vector<Student_info>& didnt);
{{{~cpp double analysis(const std::vector<Student_info>&)
{{{~cpp double (*analysis)(const std::vector<Student_info>&)
typedef double (*analysis_fp)(const vector<Student_info>&);
double (*get_analysis_ptr()) (const vector<Student_info>&);
상기의 코드에서 프로그래머가 원한 기능은 get_analysis_ptr()을 호출하면 그 결과를 역참조하여서 const vector<Student_info>&를 인자로 갖고 double 형을 리턴하는 함수를 얻는 것입니다.
const size_t NDim = 3;
const size_t PTriangle = 3;
상기와 같은 표현은 const로 지정된 변수로 변수를 초기화하기 때문에 컴파일시에 그 크기를 알 수 있다. 또한 상기와 같은 방식으로 코딩을 하면 coord에 의미를 부여할 수 잇기 때문에 장점이 존재한다.
const int month_length[] = {
"hello"와 같은 문자열 리터럴은 사실은 '''const char'''형의 배열이다. 이 배열은 실제로 사용하는 문자의 갯수보다 한개가 더 많은 요소를 포함하는데, 이는 문자열 리터럴의 끝을 나타내는 '\0' 즉 널 캐릭터를 넣어야하기 때문이다.
const char hello[] = { 'h', 'e', 'l', 'l', 'o', '\0' }; //이 표현은 const char hello[] = "hello";와 동일한 표현이다.
size_t strlen(const char* p) { // 쉬우니 기타 설명은 생략
static const double numbers[] = {
static const char* const letters[] = {
static const size_t ngrades = sizeof(numbers)/sizeof(*numbers);
요소 배열은 변화하지 않느 값이므로 const 키워드 이용
- MoreEffectiveC++/Operator . . . . 23 matches
* C++에서는 크게 두가지 방식의 함수로 형변환을 컴파일러에게 수행 시키킨다:[[BR]] '''''single-argument constructors''''' 와 '''''implicit type conversion operators''''' 이 그것이다.
* '''''single-argument constructors''''' 은 인자를 하나의 인자만으로 세팅될수 있는 생성자이다. 여기 두가지의 예를 보자
Name( const string& s);
operator double() const;
double asDouble() const;
* '''''single-argument constructor''''' 는 더 어려운 문제를 제공한다. 게다가 이문제들은 암시적 형변환 보다 더 많은 부분을 차지하는 암시적 형변환에서 문제가 발생된다.
bool operator==( const Array< int >& lhs, const Array<int>& rhs);
7줄 ''if ( a == b[i] )'' 부분의 코드에서 프로그래머는 자신의 의도와는 다른 코드를 작성했다. 이런 문법 잘못은 당연히! 컴파일러가 알려줘야 개발자의 시간을 아낄수 있으리, 하지만 이런 예제가 꼭 그렇지만은 않다. 이 코드는 컴파일러 입장에서 보면 옳은 코드가 될수 있는 것이다. 바로 Array class에서 정의 하고 있는 '''''single-argument constructor''''' 에 의하여 컴파일시 이런 코드로의 변환의 가능성이 있다.
int size() const { return theSize; }
컴파일러 단에서 a생성자인 Array( ArraySize size) 에서 ArraySize 로의 single-argument constructor를 호출하기 때문에 선언이 가능하지만
bool operator==( const Array< int >& lhs, const Array<int>& rhs);
이런 경우에 operator==의 오른쪽에 있는 인자는 int가 single-argument constructor에 거칠수 없기 때문에 에러를 밷어 낸다.
const UPInt operator++(int); // postfix++
const UPInt operator--(int); // postfix--
const UPInt& UPInt::operator++(int)
static_cast dynamic_cast const_cast reinterpret_cast
당신은 생성자를 직접 호출하기를 원할때가 있을 것이다. 하지만 생성자는 객체(object)를 초기화 시키고, 객제(object)는 오직 처음 주어지는 단 한번의 값으로 초기화 되어 질수있기 때문에 (예-const 인수들 초기화에 초기화 리스트를 쓰는 경우) 생성자를 이미 존재하고 있는 객체에 호출한다는건 생각의 여지가 없을 것이다.
Widget* constructWidgetInBuffer(void * buffer, int widgetSize)
해당 함수(construcWidgetInBuffer())는 버퍼에 만들어진 Widget 객체의 포인터를 반환하여 준다. 이렇게 호출할 경우 객체를 임의 위치에 할당할수 있는 능력 때문에 shared memory나 memory-mapped I/O 구현에 용이하다 constructorWidget에 보이는건 바로
Widget *pw = constructWidgetInBuffer(shareMemory, 10); // placement new이닷!
- ShellSort/문보창 . . . . 23 matches
const int MAX_NAME = 81;
const int MAX_TURTLE = 200;
void input_turtle(char turt[][MAX_NAME], const int & nTurt);
void move_turtle(const int * code, const int & nTurt, bool * isMove);
void incoding(const char oldTurt[][MAX_NAME], const char newTurt[][MAX_NAME], const int & nTurt, int * code);
void print_turtle(const char turt[][MAX_NAME], const int * code, const bool * isMove, const int & nTurt);
inline void show_turtle(const char turt[]) { cout << turt << endl; };
void input_turtle(char turt[][MAX_NAME], const int & nTurt)
void incoding(const char oldTurt[][MAX_NAME], const char newTurt[][MAX_NAME], const int & nTurt, int * code)
void move_turtle(const int * code, const int & nTurt, bool * isMove)
void print_turtle(const char turt[][MAX_NAME], const int * code, const bool * isMove, const int & nTurt)
- EffectiveSTL/Iterator . . . . 22 matches
* STL이 제공하는 반복자는 4가지다. (iterator, const_iterator, reverse_iterator, const_reverse_iterator)
= Item26. Prefer iterator to const_iterator, reverse_iterator, and const_reverst_iterator. =
* container<T>::const_iterator, const_reverse_iterator : const T*
* 내 해석이 잘못되지 않았다면, const_iterator는 말썽의 소지가 있는 넘이라고까지 표현하고 있다.
= Item27. Use distance and advance to convert a container's const_iterators to iterators. =
* const_iterator는 될수 있으면 쓰지 말라고 했지만, 어쩔수 없이 써야할 경우가 있다.
* 그래서 이번 Item에서는 const_iterator -> iterator로 변환하는 법을 설명하고 있다. 반대의 경우는 암시적인 변환이 가능하지만, 이건 안된다.
// iterator와 const_iterator를 각각 Iter, CIter로 typedef해놓았다고 하자.
Iter i( const_cast<Iter>(ci) ) // 역시 안된다. vector와 string에서는 될지도 모르지만... 별루 추천하지는 않는것 같다.
* 밑에께 안되는 이유는 iterator와 const_iterator는 다른 클래스이다. 상속관계도 아닌 클래스가 형변환 될리가 없다.
* vector<T>::iterator는 T*의 typedef, vector<T>::const_iterator는 const T*의 typedef이다. (클래스가 아니다.)
* string::iterator는 char*의 typedef, string::const_iterator는 const char*의 typedef이다. 따라서 const_cast<>가 통한다. (역시 클래스가 아니다.)
* 하지만 reverse_iterator와 const_reverse_iterator는 typedef이 아닌 클래스이다. const_cast<안된다>.
* 왜 안되냐면, distance의 인자는 둘자 iterator다. const_iterator가 아니다.
- Gof/Adapter . . . . 20 matches
virtual void BoundingBox(Point& bottomLeft, Point& topRight) const;
virtual Manipulator* CreateManipulator () const;
void GetOrigin (Coord& x, Coord& y) const;
void GetExtent (Coord& width, Coord& height) const;
virtual bool IsEmpty () const;
virtual void BoundingBox (Point& bottomLeft, Point& topRight) const;
virtual bool IsEmpty () const;
virtual Manipulator* CreateManipulator () const;
void TextShape::boundingBox (Point& bottomLeft, Point& topRight) const {
bool TextShape::ImEmpty () const {
Manipulator* TextShape::CreateManipulator () const {
virtual void BoundingBox (Point& bottomLeft, Point& topRight) const;
virtual bool IsEmpty () const;
virtual Manipulator* CreateManipulator () const;
TextShape must initialize the pointer to the TextView instance, and it does so in the constructor. It must also call operations on its TextView object whenever its own operations are called. In this example, assume that the client creates the TextView object and passes it to the TextShape constructor.
) const {
bool TextShape::IsEmpty () const {
Manipulator* TextShape::CreateManipulator () const {
Compare this code the class adapter case. The object adapter requires a little more effort to write, but it's more flexible. For example, the object adapter version of TextShape will work equally well with subclasses of TextView -- the client simply passes an instance of a TextView subclass to the TextShape constructor.
- MedusaCppStudy/석우 . . . . 20 matches
void Showboard(const vector< vector<int> >& board);
void Showboard(const vector< vector<int> >& board)
void print(const vector< vector<int> >& board, const Roachs& roach);
void print(const vector< vector<int> >& board, const Roachs& roach)
bool compare(const Words& x, const Words& y);
void Print(const vector<Words>& sentence);
bool compare(const Words& x, const Words& y)
void Print(const vector<Words>& sentence)
const string drinks[] = {"sprite", "cold tea", "hot tea", "tejava", "cold milk", "hot milk"};
const price[] = {400, 500, 500, 500, 600, 600};
void Command(const string& command, int& won, vector<Drinks>& vec);
void vend(int& won, vector<Drinks>& vec, const vector<Drinks>::size_type& i);
void draw(const int& won);
void Command(const string& command, int& won, vector<Drinks>& vec)
void draw(const int& won)
void vend(int& won, vector<Drinks>& vec, const vector<Drinks>::size_type& i)
- 데블스캠프2011/셋째날/String만들기/서지혜 . . . . 19 matches
String(const char* origin);
String(const String str, const int offset, const int length);
const char charAt(const int offset);
void concat(const char* str);
bool equals(const char* str);
const char* toLower();
const char* toUpper();
String::String(const char* origin)
String::String(const String str, const int offset, const int length)
const char String::charAt(int offset)
String String::concat(const char* str)
bool String::equals(const char* str)
const char* String::toLower()
const char* String::toUpper()
- MedusaCppStudy/재동 . . . . 18 matches
const int DIRECTION_ROW[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int DIRECTION_COL[8] = {0, 1, 1, 1, 0, -1, -1, -1};
void showBoard(const vector< vector<int> >& board);
bool isAllBoard(const vector< vector<int> >& board);
void inputRoachPosition(sRoach& roach, const vector< vector<int> >& board);
void showBoard(const vector< vector<int> >& board)
bool isAllBoard(const vector< vector<int> >& board)
void inputRoachPosition(sRoach& roach, const vector< vector<int> >& board)
bool compare(const sWord& x, const sWord &y);
void showResult(const vector<sWord>& words);
void checkInWords(vector<sWord>& words, const string& x);
void addInWords(vector<sWord>& words, const string& x);
bool compare(const sWord& x, const sWord &y)
void showResult(const vector<sWord>& words)
void checkInWords(vector<sWord>& words, const string& x)
void addInWords(vector<sWord>& words, const string& x)
- OurMajorLangIsCAndCPlusPlus/stdlib.h . . . . 17 matches
|| double atof(const char *str); || 문자열을 실수(double precision)로 변환 ||
|| int atoi(const char *str); || 문자열을 정수(integer)로 변환 ||
|| double strtod(const char *str, char **endptr); || 문자열을 실수(double precision)로 변환 ||
|| long int strtol(const char *str, char **endptr, int base); || 문자열을 정수(long integer)로 변환 ||
|| unsigned long int strtoul(const char *str, char **endptr, int base); || 문자열을 정수(unsigned long)로 변환 ||
|| char *getenv(const char *name); || 환경 변수를 얻는다 ||
|| int system(const char *string); || 전달인자로 받은 명령 실행 ||
|| void *bsearch(const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *)); || 이진검색 수행 ||
|| void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*)); || 퀵 소트 수행 ||
|| int mblen(const char *str, size_t n); || 다중 바이트 문자의 길이 리턴 ||
|| size_t mbstowcs(schar_t *pwcs, const char *str, size_t n); || 다중 바이트 문자 스트링을 wide 문자 스트링으로 변환 ||
|| int mbtowc(whcar_t *pwc, const char *str, size_t n); || 다중 바이트 문자를 wide 문자로 변환 ||
|| size_t wcstombs(char *str, const wchar_t *pwcs, size_t n); || wide 문자 스트링을 다중 바이트 스트링으로 변환 ||
- MoreEffectiveC++/Basic . . . . 16 matches
void printDouble(const double& rd)
void printDouble (const double* pd)
사견: Call by Value 보다 Call by Reference와 Const의 조합을 선호하자. 저자의 Effective C++에 전반적으로 언급되어 있고, 프로그래밍을 해보니 괜찮은 편이었다. 단 return에서 말썽이 생기는데, 현재 내 생각은 return에 대해서 회의적이다. 그래서 나는 COM식 표현인 in, out 접두어를 사용해서 아예 인자를 넘겨서 관리한다. C++의 경우 return에 의해 객체를 Call by Reference하면 {} 를 벗어나는 셈이 되는데 어디서 파괴되는 것인가. 다 공부가 부족해서야 쩝 --;
const_cast<type>(expression)
다른 cast 문법은 const와 class가 고려된 C++ style cast연산자 이다.
* ''const_cast<type>(expression)예제''
const SpecialWidget& csw = sw;
update(&csw); // 당연히 안됨 const인자이므로 변환(풀어주는 일) 시켜 주어야 한다.
update(const_cast<SpecialWidget*>(&csw)); // 옳타쿠나
update(const_cast<SpecialWidget*>(pw)); // error!
// const_cast<type>(expression) 는
// 오직 상수(constness)나 변수(volatileness)에 영향을 미친다.
// const_cast 가 down cast가 불가능 한 대신에 dynamic_cast 는 말그대로
#define const_cast(TYPE, TEXPR) ((TYPE) (EXPR))
update(const_cast(SpecialWidget*, &sw));
void printBSTArray( ostream& s, const BST array[], int numElements)
== Item 4: Avoid gratuitous default constructors. ==
- 데블스캠프2013/셋째날/머신러닝 . . . . 16 matches
const int SIZEBIG = 8165;
const int SIZESMALL = 20;
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
std::vector<std::string> split(const std::string &s, char delim) {
const int Label_Num=20;
const int Word_Num=8165;
const int News_Num=11293;
void readFile(int ** target, const char * filename, int row, int col);
void readFile(int ** target, const char * filename, int row, int col){
const int SIZE = 11293;
const int rowSize();
const int colSize();
const int DoubleArray::rowSize(){
const int DoubleArray::colSize(){
void readFile(DoubleArray & target, const char * filename);
void readFile(DoubleArray & target, const char * filename){
- RandomWalk2/조현태 . . . . 15 matches
const int MOVE_TYPE = 8;
const int ADD_X[MOVE_TYPE] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ADD_Y[MOVE_TYPE] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int MOVE_TYPE = 8;
const int ADD_X[MOVE_TYPE] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ADD_Y[MOVE_TYPE] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int MOVE_TYPE = 8;
const int ADD_X[MOVE_TYPE] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ADD_Y[MOVE_TYPE] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int MOVE_TYPE = 8;
const int ADD_X[MOVE_TYPE] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ADD_Y[MOVE_TYPE] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int MOVE_TYPE = 9;
const int ADD_X[MOVE_TYPE] = {0, 1, 1, 1, 0, -1, -1, -1, 0};
const int ADD_Y[MOVE_TYPE] = {-1, -1, 0, 1, 1, 1, 0, -1, 0};
- VonNeumannAirport/Leonardong . . . . 14 matches
def construct( self, origins, destinations ):
def construct( self, origin, traffics ):
self.distMatrix.construct( origins = range(1,MAX+1),
self.distMatrix.construct( origins = range(1,MAX+1),
self.traffic.construct( origin = 1,
self.traffic.construct( origin = 1,
self.traffic.construct( origin = 2,
self.distMatrix.construct( origins = [1,2],
self.distMatrix.construct( origins = [1,2],
self.traffic.construct( origin = 1,
self.traffic.construct( origin = 2,
self.traffic.construct( origin = 3,
self.distMatrix.construct( origins = [1,2,3],
self.distMatrix.construct( origins = [2,3,1],
- AcceleratedC++/Chapter4 . . . . 13 matches
double grade(double midterm, double final, const vector<double>& hw)
* const vector<double>& hw : 이것을 우리는 double형 const vector로의 참조라고 부른다. reference라는 것은 어떠한 객체의 또다른 이름을 말한다. 또한 const를 씀으로써, 저 객체를 변경하지 않는다는 것을 보장해준다. 또한 우리는 reference를 씀으로써, 그 parameter를 복사하지 않는다. 즉 parameter가 커다란 객체일때, 그것을 복사함으로써 생기는 overhead를 없앨수 있는 것이다.
* 이제 우리가 풀어야 할 문제는, 숙제의 등급을 vector로 읽어들이는 것이다. 여기에는 두가지의 문제점이 있다. 바로 리턴값이 두개여야 한다는 점이다. 하나는 읽어들인 등급들이고, 또 다른 하나는 그것이 성공했나 하는가이다. 하나의 대안이 있다. 바로 리턴하고자 하는 값을 리턴하지 말고, 그것을 reference로 넘겨서 변경해주는 법이다. const를 붙이지 않은 reference는 흔히 그 값을 변경할때 쓰인다. reference로 넘어가는 값을 변경해야 하므로 어떤 식(expression)이 reference로 넘어가면 안된다.(lvalue가 아니라고도 한다. lvalue란 임시적인 객체가 아닌 객체를 말한다.)
* grade 함수를 보면, vector는 const 참조로 넘기고, double은 그렇지 않다. int나 double같은 기본형은 크기가 작기 때문에, 그냥 복사로 넘겨도 충분히 빠르다. 뭐 값을 변경해야 할때라면 참조로 넘겨야겠지만... const 참조는 가장 일반적인 전달방식이다.
* const가 아닌 참조형 파라메터는 lvalue여야만 한다.
double grade(double midterm, double final, const vector<double>& hw);
double grade(double midterm, double final, const vector<double>& hw)
double grade(const Student_info& s)
bool compare(const Student_info& x, const Student_info& y)
- LongestNap/문보창 . . . . 13 matches
bool operator() (const Promise & a, const Promise & b)
const int MAX = 100;
const int START_TIME = 10;
const int END_TIME = 18;
Promise set_naptime(const Promise * pro, const int & nPromise);
void show(const Promise & nap, const int & index);
Promise set_naptime(const Promise * pro, const int & nPro)
void show(const Promise & nap, const int & index)
- OurMajorLangIsCAndCPlusPlus/XML/조현태 . . . . 13 matches
* C...C++이랑 많이 다르구나~ @.@ const, bool형이 없고 형체크가 정확하지 않아서 조마조마 했다는..ㅎㅎ
const char DEBUG_TEXT[] = "<zeropage>\n <studies>\n <cpp>\n <instructor>이상규</instructor>\n <participants>\n <name>김상섭</name>\n <name>김민경</name>\n <name>송수생</name>\n <name>조현태</name>\n </participants>\n </cpp>\n <java>\n <instructor>이선호</instructor>\n <participants>\n <name>김민경</name>\n <name>송수생</name>\n <name>조현태</name>\n </participants>\n </java>\n <mfc>\n <participants/>\n </mfc>\n </studies>\n</zeropage>\n";
SReadBlock* CreateNewBlock(const char* name, const char* contents)
const char* CreateTree(SReadBlock* headBlock, const char* readData)
const char* nameEndPoint = strchr(readData, '>');
const char* contentsEndPoint = strchr(readData, '<');
void SuchAllSameNamePoint(const char* name, SReadBlock* suchBlock, SReadBlock*** suchedBlocks)
void printSuchPoints(const char* query, SReadBlock* suchBlock)
const char* suchEndPoint = NULL;
const char* readData = DEBUG_TEXT;
const char query[INPUT_BUFFUR];
- ACM_ICPC/PrepareAsiaRegionalContest . . . . 12 matches
const int MAX = 1001;
const int SQUARE_SIZE = 11;
bool equals(const Coin & coin){ return this->face == coin.face; }
void set(const char face ){ this->face = face; }
const int MAX = 4;
const int SIZE = 3;
const int INT_MAX = 20000000;
void constructCoins( const char input[SIZE][SIZE] );
void Gamer::constructCoins( const char input[SIZE][SIZE] )
gamer.constructCoins( input );
- MoreEffectiveC++/Appendix . . . . 12 matches
I generally refer to this as "the LSD book," because it's purple and it will expand your mind. Coplien covers some straightforward material, but his focus is really on showing you how to do things in C++ you're not supposed to be able to do. You want to construct objects on top of one another? He shows you how. You want to bypass strong typing? He gives you a way. You want to add data and functions to classes as your programs are running? He explains how to do it. Most of the time, you'll want to steer clear of the techniques he describes, but sometimes they provide just the solution you need for a tricky problem you're facing. Furthermore, it's illuminating just to see what kinds of things can be done with C++. This book may frighten you, it may dazzle you, but when you've read it, you'll never look at C++ the same way again. ¤ MEC++ Rec Reading, P27
template<class U> // copy constructor member
T& operator*() const; // see Item 28
T* operator->() const; // see Item 28
T* get() const; // return value of current
inline T& auto_ptr<T>::operator*() const
inline T* auto_ptr<T>::operator->() const
inline T* auto_ptr<T>::get() const
T& operator*() const { return *pointee; }
T* operator->() const { return pointee; }
T* get() const { return pointee; }
If your compilers lack support for member templates, you can use the non-template auto_ptr copy constructor and assignment operator described in Item 28. This will make your auto_ptrs less convenient to use, but there is, alas, no way to approximate the behavior of member templates. If member templates (or other language features, for that matter) are important to you, let your compiler vendors know. The more customers ask for new language features, the sooner vendors will implement them. ¤ MEC++ auto_ptr, P8
- OurMajorLangIsCAndCPlusPlus/2006.2.06/김상섭 . . . . 12 matches
int newstring::length() const
newstring::newstring(const char* ch)
newstring::newstring(const newstring & ns)
void operator+=(const newstring & a)
newstring & newstring::operator=(const char* ch)
newstring & newstring::operator=(const newstring ns)
bool operator==(const newstring & a, const newstring & b)
newstring & operator+(const newstring & a, const newstring & b)
ostream & operator<<(ostream & os, const newstring& ns)
const newstring s = "123";
- OurMajorLangIsCAndCPlusPlus/Class . . . . 12 matches
const int i;
X(int ii, const string& n, Date d, Club& c) : i(ii), c(n, d), pc(c) {}
=== const 멤버 함수 ===
int year() const;
int month() const;
int day() const;
int Date::year() const
int Date::month() const
int Date::day() const
void compute_cache_value() const;
string string_rep() const;
string Date::string_rep() const
- RandomWalk/영동 . . . . 12 matches
const int MAX_X=5;
const int MAX_Y=5;
const int DIRECTION=8;
const int MOVE_X[DIRECTION]={0, 1, 1, 1, 0, -1, -1, -1};
const int MOVE_Y[DIRECTION]={-1, -1, 0, 1, 1, 1, 0, -1};
const int MAX_X=5;
const int MAX_Y=5;
const int DIRECTION=8;
const int MOVE_X[DIRECTION]={0, 1, 1, 1, 0, -1, -1, -1};
const int MOVE_Y[DIRECTION]={-1, -1, 0, 1, 1, 1, 0, -1};
const int MAX_X=5;
const int MAX_Y=5;
- Slurpys/강인수 . . . . 12 matches
function HasDorEAtFirst (const S: String): Boolean;
function HasGAtLast (const S: String; APos: Integer): Boolean;
function FindF (const S: String): Integer;
function IsSlump (const S: String): Boolean;
function IsSlimp (const S: String): Boolean;
function IsSlurpy (const S: String): Boolean;
function HasDorEAtFirst (const S: String): Boolean;
function HasGAtLast (const S: String; APos: Integer): Boolean;
function FindF (const S: String): Integer;
function IsSlump (const S: String): Boolean;
function IsSlimp (const S: String): Boolean;
function IsSlurpy (const S: String): Boolean;
- TheGrandDinner/김상섭 . . . . 12 matches
bool compare_table(const table & a,const table & b)
bool compare_team_max(const team & a,const team & b)
bool compare_team_num(const team & a,const team & b)
bool compare_table(const table & a,const table & b)
bool compare_team_max(const team & a,const team & b)
bool compare_team_num(const team & a,const team & b)
- TowerOfCubes/조현태 . . . . 12 matches
const char DEBUG_READ[] = "3\n1 2 2 2 1 2\n3 3 3 3 3 3\n3 2 1 1 1 1\n10\n1 5 10 3 6 5\n2 6 7 3 6 9\n5 7 3 2 1 9\n1 3 3 5 8 10\n6 6 2 2 4 4\n1 2 3 4 5 6\n10 9 8 7 6 5\n6 1 2 3 4 7\n1 2 3 3 2 1\n3 2 1 1 2 3\n0";
const int BOX_FACE_NUMBER = 6;
const char FACE_NAME[BOX_FACE_NUMBER][7] = {"front", "back", "left", "right", "top", "bottom"};
const int FRONT = 0;
const int BACK = 1;
const int LEFT = 2;
const int RIGHT = 3;
const int TOP = 4;
const int BOTTOM = 5;
const char* AddBox(const char* readData, vector<SMyBox*>& myBoxs)
const char* readData = DEBUG_READ;
- Gof/FactoryMethod . . . . 11 matches
Virtual Constructor ( ["MoreEffectiveC++"] Item 25 참고 )
You can avoid this by being careful to access products solely through accessor operations that create the product on demand. Instead of creating the concrete product in the constructor, the constructor merely initializes it to 0. The accessor returns the product. But first it checks to make sure the product exists, and if it doesn't, the accessor creates it. This technique is sometimes called lazy initialization. The following code shows a typical implementation:
virtual Maze* MakeMaze() const
virtual Room* MakeRoom(int n) const
virtual Wall* MakeWall() const
virtual Door* MakeDoor(Room* r1, Room* r2) const
virtual Wall* MakeWall() const
virtual Room* MakeRoom(int n) const
virtual Room* MakeRoom(int n) const
virtual Door* MakeDoor(Room* r1, Room* r2) const
Spell* CastSpell() const;
- CPPStudy_2005_1/STL성적처리_2 . . . . 10 matches
vector<string> tokenize(const string& line);
double total(const vector<int>&);
const map< string, vector<int> >,
double accu(const vector<int>&) = total);
vector<string> tokenize(const string& line) {
double total(const vector<int>& grades) {
const map< string, vector<int> > record,
double accu(const vector<int>&)) {
for(map< string, vector<int> >::const_iterator iter = record.begin();
for(vector<int>::const_iterator grades = (iter->second).begin();
- [Lovely]boy^_^/USACO/PrimePalinDromes . . . . 10 matches
bool IsPrime(const int& n);
bool IsPalinDromes(const string& str);
void OutputResult(const int& n, const int& m);
void FillPrimeList(const int& n, const int& m);
void OutputResult(const int& min, const int& max)
bool IsPalinDromes(const string& str)
bool IsPrime(const int& n)
- 레밍즈프로젝트/박진하 . . . . 10 matches
// Construction
int GetSize() const;
int GetUpperBound() const;
TYPE GetAt(int nIndex) const;
const TYPE* GetData() const;
int Append(const CArray& src);
void Copy(const CArray& src);
TYPE operator[](int nIndex) const;
void Dump(CDumpContext&) const;
void AssertValid() const;
- AcceleratedC++/Chapter8 . . . . 9 matches
T max(const T& left, const T& right)
{{{~cpp template <class In, class X> In find(In begin, In end, const X& x) {
template <class In, class X> In find(In begin, In end, const X& x) {
template <class For, class X> void replace(For begin, For end, const X& x, const X& y) {
template <class Ran, class X> bool binary_search(Ran begin, Ran end, const X& x) {
void split(const string& str, Out os) { // changed
typedef string::const_iterator iter;
- CppStudy_2002_1/과제1/상협 . . . . 9 matches
void show(const stringy in, int iteration=1);
void show(const char in[], int iteration=1);
void show(const stringy in, int iteration)
void show(const char in[], int iteration)
const int Len = 40;
void setgolf(golf &g, const char *name,int hc);
void showgolf(const golf &g);
void setgolf(golf &g, const char *name, int hc)
void showgolf(const golf &g)
- SpiralArray/영동 . . . . 9 matches
const int RIGHT=0;
const int DOWN=1;
const int LEFT=2;
const int UP=3;
const int DIRECTION=4;//이동 가능한 총 방향수
const int MOVE_X[DIRECTION]={1, 0, -1, 0};
const int MOVE_Y[DIRECTION]={0, 1, 0, -1};
const int MAX_X=5;
const int MAX_Y=5;
- TheTrip/문보창 . . . . 9 matches
const int MAX = 100;
int exchangeMoney(const int * cost, const int n);
void showExchange(const int * ex, const int count);
int exchangeMoney(const int * cost, const int n)
void showExchange(const int * ex, const int count)
- VendingMachine/세연/1002 . . . . 9 matches
2. 소위 magic number (ex : 배열의 범위를 설정하는 숫자들) 라 불리는 것들에 대해 - const 변수 선언[[BR]]
const int DRINKNAME_MAXLENGTH = 255;
const int TOTAL_DRINK_TYPE = 5;
const int DRINKNAME_MAXLENGTH = 255;
const int TOTAL_DRINK_TYPE = 5;
const int validMoney[5] = {10, 50, 100, 500, 1000};
const int DRINKNAME_MAXLENGTH = 255;
const int TOTAL_DRINK_TYPE = 5;
const int validMoney[5] = {10, 50, 100, 500, 1000};
- 기본데이터베이스/조현태 . . . . 9 matches
const int MAX_DATA_SIZE=100;
const int HANG_MOK=4;
const int MAX_MENU=8;
const int QUIT=6;
const char menu[MAX_MENU][20]={"insert","modify","delete","undelete","search","list","quit","?"};
const char print_outs[HANG_MOK][5]={"id","name","tel","add"};
const int MAX_BLOCK_SIZE=256;
const int FALSE=-1;
const int ALL=-1;
- 진법바꾸기/문보창 . . . . 9 matches
const int LEN = 50;
void parse_base(const int num, const int base);
void show_num(const int * parse_num, const int length);
void parse_base(const int num, const int base)
void show_num(const int * parse_num, const int length)
- AustralianVoting/Leonardong . . . . 8 matches
bool isWin( const Candidator & candidator, int n )
int current( const VoteSheet & sheet )
void collectVoting( CandidatorVector & candidators, const VoteSheetVector & sheets )
void markFall( CandidatorVector & candidators, const int limit )
int minVotedNum( const CandidatorVector & candidators )
bool isUnionWin( const CandidatorVector & candidators )
int countRemainCandidators( const CandidatorVector & candidators )
bool isSomeoneWin( const CandidatorVector & candidators )
- AustralianVoting/문보창 . . . . 8 matches
bool elect(const char can[][81], const int & nCan, const int bal[][20], const int & nBal, string & win);
bool elect(const char can[][81], const int & nCan, const int bal[][20], const int & nBal, string & win)
- BeeMaja/문보창 . . . . 8 matches
void set_coord(int& n, const Coord curCoord)
void go_down(const int len, int& n, Coord& curCoord)
void go_left_up(const int len, int& n, Coord& curCoord)
void go_up(const int len, int& n, Coord& curCoord)
void go_right_up(const int len, int& n, Coord& curCoord)
void go_right_down(const int len, int& n, Coord& curCoord)
void go_left_down(const int len, int& n, Coord& curCoord)
void cruise_comb(const int len, int& n, Coord& curCoord)
- CPPStudy_2005_1/STL성적처리_1 . . . . 8 matches
bool totalCompare(const Student_info &s1, const Student_info &s2);
ostream& displayScores(ostream &out, const vector<Student_info> &students);
bool totalCompare(const Student_info &s1, const Student_info &s2)
ostream& displayScores(ostream &out, const vector<Student_info> &students)
for(vector<Student_info>::const_iterator it = students.begin() ; it!=students.end();++it)
for(vector<string>::const_iterator it = subject.begin() ;
- CppStudy_2002_2/STL과제/성적처리 . . . . 8 matches
ScoresTable(const string& aStudentName) : _StudentName(aStudentName)
const string& getName() const
int getnthScore(int n) const
int getTotalScore() const
double getAverageScore() const
bool operator()(ScoresTable* stu1, ScoresTable* stu2) const
bool operator()(ScoresTable* stu1, ScoresTable* stu2) const
- IsBiggerSmarter?/문보창 . . . . 8 matches
const int MAX_ELEPHANT = 1100;
bool operator () (const Elephant & a, const Elephant & b)
const int MAX_ELEPHANT = 1010;
const int WEIGHT = 1;
const int IQ = 2;
bool operator () (const Elephant & a, const Elephant & b)
- RandomWalk/ExtremeSlayer . . . . 8 matches
void ShowBoardStatus() const;
bool CheckCompletelyPatrol() const;
int GetRandomDirection() const;
bool CheckCorrectCoordinate(int& nDelRow, int& nDelCol) const;
bool RandomWalkBoard::CheckCompletelyPatrol() const
void RandomWalkBoard::ShowBoardStatus() const
int RandomWalkBoard::GetRandomDirection() const
bool RandomWalkBoard::CheckCorrectCoordinate(int& nDelRow, int& nDelCol) const
- StringOfCPlusPlus/상협 . . . . 8 matches
String(const char *in_st);
int nval() const {return n;}//문자열 길이를 알려줌.
String operator+(const String &s) const;
String::String(const char *in_st)
/*String::strlen() const
String String::operator +(const String &s) const
- StringOfCPlusPlus/영동 . . . . 8 matches
Anystring(const char*);
Anystring operator+(const Anystring &string1); //const;
friend ostream& operator<<(ostream & os, const Anystring & a_string);
Anystring::Anystring(const char* tempstr)
Anystring Anystring::operator+(const Anystring &string1) //const
ostream& operator<<(ostream& os, const Anystring & a_string)
- VonNeumannAirport/인수 . . . . 8 matches
int getPassengerNum() const
int getDepartureGateNum() const
int getArrivalGateNum() const
void addTrafficData(const Traffic& traffic)
int getTrafficAmount(const Traffic& traffic) const
int getDistance(const Traffic& traffic) const
- AntOnAChessboard/문보창 . . . . 7 matches
inline void show(const int i, const int j)
void show_typeA(const int x, const int y)
void show_typeB(const int y, const int x)
void show_typeS(const int x)
- Boost/SmartPointer . . . . 7 matches
bool operator()( const FooPtr & a, const FooPtr & b )
void operator()( const FooPtr & a )
example( const example & );
example & operator=( const example & );
example::example( const example & s ) : _imp( s._imp ) {}
example & example::operator=( const example & s )
- BoostLibrary/SmartPointer . . . . 7 matches
bool operator()( const FooPtr & a, const FooPtr & b )
void operator()( const FooPtr & a )
example( const example & );
example & operator=( const example & );
example::example( const example & s ) : _imp( s._imp ) {}
example & example::operator=( const example & s )
- CppStudy_2002_1/과제1/Yggdrasil . . . . 7 matches
void say(const char *);
void say(const char *str)
const int Len=40;
void setgolf(golf &g, const char *name, int hc);
void showgolf(const golf &g);
void setgolf(golf &g, const char *name, int hc)
void showgolf(const golf & g)
- FromDuskTillDawn/조현태 . . . . 7 matches
const char DEBUG_READ[] = "2\n3\nUlm Muenchen 17 2\nUlm Muenchen 19 12\nUlm Muenchen 5 2\nUlm Muenchen\n10\nLugoj Sibiu 12 6\nLugoj Sibiu 18 6\nLugoj Sibiu 24 5\nLugoj Medias 22 8\nLugoj Medias 18 8\nLugoj Reghin 17 4\nSibiu Reghin 19 9\nSibiu Medias 20 3\nReghin Medias 20 4\nReghin Bacau 24 6\nLugoj Bacau";
const int BUFFER_SIZE = 255;
STown(const char* inputName)
STown* SuchOrAddTown(const char* townName)
const char* Parser(const char* readData)
const char* readData = DEBUG_READ;
- OurMajorLangIsCAndCPlusPlus/Variable . . . . 7 matches
=== const 키워드 ===
const int a;
int const b;
const int *c;
int * const d;
const int * const e;
- OurMajorLangIsCAndCPlusPlus/locale.h . . . . 7 matches
#define LC_ALL (integer constant expression) 모든 카테고리에 대한 로케일 설정을 위한 환경변수이다
#define LC_COLLATE (integer constant expression) 스트링(string)의 정렬 순서(sort order 또는 collation)를 위한 로케일 설정을 위해 사용
#define LC_CTYPE (integer constant expression) 문자 분류(알파벳, 숫자, 한글 또는 소문자, 대문자 등등), 변환, 대소문자 비교을 위한 로케일 설정을 의미
#define LC_MONETARY (integer constant expression) 금액 표현(천단위 구분 문자, 소수점 문자, 금액 표시 문자, 그 위치 등)을 위한 로케일 설정
#define LC_NUMERIC (integer constant expression) 금액이 아닌 숫자 표현(천단위, 소수점, 숫자 그룹핑 등)을 위한 로케일 설정
#define LC_TIME (integer constant expression) 시간과 날짜의 표현(년, 월, 일에 대한 명칭 등)을 위한 로케일 설정 예를 들어 strftime(), strptime()
|| char* setlocale(int category, const char* locale); || category에 대해 로케일 locale을 설정하고 (물론, 사용 가능한 로케일인 경우), 설정된 로케일값을 리턴. ||
- OurMajorLangIsCAndCPlusPlus/time.h . . . . 7 matches
|| char *asctime(const struct tm *timeptr); || tm 구조체를 문자열로 바꾼다. ||
|| char *ctime(const time_t *timer); || ||
|| struct tm *gmtime(const time_t *timer); || timer 를 GMT에 입각하여 tm 구조체의 값으로 변환한다. ||
|| struct tm *localtime(const time_t *timer); || timer를 local time 에 입각하여 tm 구조체의 값으로 변환한다. ||
|| size_t strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr); || time 과 date 를 문자열로 바꾼다. ||
|| struct tm *getdate(const char *); || 문자열을 tm 구조체로 변환한다. ||
- Slurpys/문보창 . . . . 7 matches
const int MAX_LEN = 61;
bool isSlurpy(const char * str, int & index);
bool isSlimp(const char * str, int & index);
bool isSlump(const char * str, int & index);
bool isSlurpy(const char * str, int & index)
bool isSlimp(const char * str, int & index)
bool isSlump(const char * str, int & index)
- Star/조현태 . . . . 7 matches
bool operator == (const SavePoint& target) const
bool operator < (const SavePoint& target) const
const int START_POINT_Y[4] = {0, 1, 2, 2};
const int END_POINT_Y[4] = {6, 6, 7, 8};
const int START_POINT_Z[4] = {1, 1, 1, 0};
- 데블스캠프2012/다섯째날/C로배우는C++원리 . . . . 7 matches
void setName(void* this,const char* name) {
void setAge(void* this, const int age) {
void createPerson(void* this, const char* name, const int age){
void createStudent(void* this, const char* name, const int age, const char* studentID){
- 작은자바이야기 . . . . 7 matches
* 클래스와 그 멤버에 적용하는 기본 modifier들의 개념 및 용법을 다뤘습니다.
* static modifier에 대해 애매하게 알고 있었는데 자세하게 설명해주셔서 좋았습니다. static은 타입을 통해서 부르는거라거나 원래 모든 함수가 static인데 객체지향의 다형성을 위해 static이 아닌 함수가 생긴거라는 설명은 신기했었습니다. object.method(message) -> MyType::method(object, method) 부분이 oop 실제 구현의 기본이라는 부분은 잊어버리지 않고 잘 기억해둬야겠습니다. 근데 파이썬에서 메소드 작성시 (self)가 들어가는 것도 이것과 관련이 있는건가요? -[서영주]
* 멀티스레드 환경에서 synchronized modifier를 사용한 동기화에 대해 공부했습니다.
* 동기화 부하를 피하기 위한 DCL 패턴의 문제점을 살펴보고 Java 5 이후에서 volatile modifier로 해결할 수 있음을 배웠습니다.
* transient modifier는 VM의 자동 직렬화 과정에서 특정 속성을 제외할 수 있고, Externalizable 인터페이스를 구현하면 직렬화, 역직렬화 방식을 직접 정의할 수 있음을 보았습니다.
* native modifier로 함수의 인터페이스를 선언할 수 있고, 마샬링, 언마샬링 과정에서 성능 손실이 있을 수 있음을 이야기했습니다.
* .java 파일에는 클래스 내에 native modifier를 붙인 메소드를 작성하고, .c, .cpp 파일에는 Java에서 호출될 함수의 구현을 작성한다. 이후 System.loadLibrary(...) 함수를 이용해서 .dll 파일(Windows의 경우) 또는 .so(shared object) 파일(Linux의 경우)을 동적으로 로드한다.
- AcceleratedC++/Chapter5 . . . . 6 matches
bool fgrade(const Student_info& s)
for(vector<Student_info>::const_iterator i = students.begin() ; i != students.end() ; ++i)
* const_iterator : 값을 변경시키지 않고 순회할때
* 필요에 따라 iterator에서 const_iterator로 캐스팅된다. 반대는 안된다.
* 아까는 const였는데 이번엔 왜 아니냐고? 컨테이너 안에 있는 것을 지우지 않는가. 즉 변형시킨다는 것이다.
for(vector<string>::const_iterator i = bottom.begin(); i != bottom.end(); ++i)
- DoubleDispatch . . . . 6 matches
Integer Integer::operator+(const Number& aNumber)
Float Float::operator+(const Number& aNumber)
Integer Integer::addInteger(const Integer& anInteger)
Float Float::addFloat(const Float& aFloat)
Float Integer::addFloat(const Float& aFloat)
Integer Float::addInteger(const Integer& anInteger)
- EffectiveSTL/Container . . . . 6 matches
* 컨테이너에 Object를 넣을때에는, 그 Object의 복사 생성자(const reference)와, 대입 연산자를 재정의(const reference) 해주자. 안그러면 복사로 인한 엄청난 낭비를 보게 될것이다.
for(vector<Object>::const_itarator VWCI = a.begin() + a.size()/2 ; VWCI != a.end() ; ++VWCI)
struct DeleteObject : public unary_function<const T*, void>
void operator()(const T* ptr) const
- Gof/Composite . . . . 6 matches
const char* Name () { return _name; }
Equipment (const char*);
const char* _name;
FloppyDisk (const char*);
CompositeEquipment (const char*);
Chassis (const char*);
- Gof/Facade . . . . 6 matches
const char* variableName
) const;
) const;
) const;
) const;
이 구현에서는 사용하려는 code-generator의 형태에 대해서 hard-codes (직접 특정형태 부분을 추상화시키지 않고 바로 입력)를 했다. 그렇게 함으로서 프로그래머는 목적이 되는 아키텍처로 구체화시키도록 요구받지 않는다. 만일 목적이 되는 아키텍처가 단 하나라면 그것은 아마 이성적인 판단일 것이다. 만일 그러한 경우가 아니라면 우리는 Compiler 의 constructor 에 CodeGenerator 를 인자로 추가하기 원할 것이다. 그러면 프로그래머는 Compiler를 instance화 할때 사용할 generator를 구체화할 수 있다. Compiler facade는 또한 Scanner나 ProgramNodeBuilder 등의 다른 협동하는 서브시스템클래스를 인자화할 수 있다. 그것은 유연성을 증가시키지만, 또한 일반적인 사용형태에 대해 인터페이스의 단순함을 제공하는 Facade pattern의 의의를 떨어뜨린다.
- JavaScript/2011년스터디/김수경 . . . . 6 matches
// don't run the init constructor)
// The dummy class constructor
// All construction is actually done in the init method
// Populate our constructed prototype object
// Enforce the constructor to be what we expect
Class.constructor = Class;
- LoveCalculator/조현태 . . . . 6 matches
const int MAX_SIZE_NAME=25;
const int BACK_SPACE=8;
const int MAX_SIZE_NAME=25;
const int BACK_SPACE=8;
const int ENTER=13;
으흐.. 맞다!!!! 상수 처리해주는거 난 안했는데. define이나 const 이런거 귀찮아서 자꾸 안하게 되드라 ㅋㅋ ㅠㅠ 반성!!
- Omok/은지 . . . . 6 matches
const up = 0x48;
const down = 0x50;
const right = 0x4d;
const left = 0x4b;
const esc = 0x1b;
const space = 0x20;
- OurMajorLangIsCAndCPlusPlus/2006.2.06/허준수 . . . . 6 matches
myString(const char* ch) {
myString(const myString& s) {
int length() const {
void operator = (const myString& s) {
ostream& operator << (ostream& o, const myString& s) {
/*const myString s = "123";
- OurMajorLangIsCAndCPlusPlus/print/김상섭 . . . . 6 matches
void print_s(const char * temp, int sort)
void print_s_a(const char ** temp, int num)
void print(const char * list, ...)
print_s(va_arg(args, const char *), sort);
const char ** temp = va_arg(args, const char **);
- PokerHands/문보창 . . . . 6 matches
const int NONE = 0;
const int TIED = 2;
const int BLACK = -1;
const int WHITE = 1;
inline int comp(const void *i,const void *j) { return *(int *)i-*(int *)j; };
- PowerOfCryptography/조현태 . . . . 6 matches
const int TRUE=1;
const int FALSE=0;
const int TRUE=1;
const int FALSE=0;
const int ENTER=13;
const unsigned __int64 MAX_LONG=1000000000000000000;
- ReverseAndAdd/문보창 . . . . 6 matches
void showPalim(const unsigned int * pal, const int * nadd, const int n);
void showPalim(const unsigned int * pal, const int * nadd, const int n)
- ScheduledWalk/석천 . . . . 6 matches
const int MAX_JOURNEY_LENGTH = 1000;
const int MAX_JOURNEY_LENGTH = 1000;
const int MAX_JOURNEY_LENGTH = 1000;
const int MAX_JOURNEY_LENGTH = 1000;
const int MAX_JOURNEY_LENGTH = 1000;
const int MAX_JOURNEY_LENGTH = 1000;
- SelfDelegation . . . . 6 matches
void put(const T1& keyObject, const T2& valueObject) {
void HashTable::put(const T1& keyObject, const T2& valueObject, Dictionary* collection)
HashTable& Dictionary::hashOf(const T& object) {
HashTable& IdentityDictionary::hashOf(const T& object) {
- SpiralArray/Leonardong . . . . 6 matches
def construct(self, pointList):
def testConstructArray(self):
self.array.construct( self.mover.getHistory() )
array.construct(mover.getHistory())
def construct(self, pointList):
def testConstructArray(self):
self.array.construct( self.mover.getHistory() )
array.construct(mover.getHistory())
- TheGrandDinner/하기웅 . . . . 6 matches
bool compareTeam(const Team &a, const Team &b)
bool compareTeam2(const Team &a, const Team &b)
bool compareTable(const Table &a, const Table &b)
- 데블스캠프2011/셋째날/String만들기/김준석 . . . . 6 matches
String(const char *original){
String(const String& str, const int offset,const int count){
char charAt(const int at){
int compareTo(const char * compare){
- 숫자를한글로바꾸기/조현태 . . . . 6 matches
const bool TRUE=1;
const bool FALSE=0;
const int MAX_LONG=5;//최대가 5자리 숫자이기때문.
const int MAX_NUMBER=10000;//최대가 10000이기때문.
const char NUMBER_TO_HAN[10][3]={"영","일","이","삼","사","오","육","칠","팔","구"};
const char NUMBER_TO_JARI[5][3]={"","십","백","천","만"};
- 오목/곽세환,조재화 . . . . 6 matches
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
// COhbokView construction/destruction
// TODO: add construction code here
void COhbokView::AssertValid() const
void COhbokView::Dump(CDumpContext& dc) const
- 오목/민수민 . . . . 6 matches
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
// CSampleView construction/destruction
// TODO: add construction code here
void CSampleView::AssertValid() const
void CSampleView::Dump(CDumpContext& dc) const
- 오목/재선,동일 . . . . 6 matches
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
// CSingleView construction/destruction
// TODO: add construction code here
void CSingleView::AssertValid() const
void CSingleView::Dump(CDumpContext& dc) const
- 오목/진훈,원명 . . . . 6 matches
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
// COmokView construction/destruction
// TODO: add construction code here
void COmokView::AssertValid() const
void COmokView::Dump(CDumpContext& dc) const
- 주민등록번호확인하기/조현태 . . . . 6 matches
const int BACK_SPACE=8;
const int CHAR_TO_NUMBER=48;
const int BACK_SPACE=8;
const int CHAR_TO_NUMBER=48;
const int BACK_SPACE=8;
const int CHAR_TO_NUMBER=48;
- AcceleratedC++/Chapter1 . . . . 5 matches
const std::string greeting = "Hello, " + name + "!";
const std::string spaces(greeting.size(), ' ');
const std::string second = "* " + spaces + " *";
const std::string first(second.size(), '*');
초기화, end-of-file, buffer, flush, overload, const, associativity(결합방식), 멤버함수, 기본 내장 타입, 기본타입(built-in type)
- C++/SmartPointer . . . . 5 matches
SmartPtr(const SmartPtr<_Ty>& _Y) throw ()
SmartPtr<_Ty>& operator=(const SmartPtr<_Ty>& _Y) throw ()
_Ty& operator*() const throw ()
_Ty *operator->() const throw ()
_Ty *get() const throw ()
- CppStudy_2002_1/과제1/CherryBoy . . . . 5 matches
const int Len=40;
void setgolf(golf & g, const char * name, int hc);
void showgolf(const golf & g);
void setgolf(golf & g, const char * name, int hc)
void showgolf(const golf & g)
- LC-Display/문보창 . . . . 5 matches
const int MAX_LINE = 2000; // test case의 수
const int MAX_ROW = 23;
const int MAX_COL = 103;
void makeDisplay(Digit * d, const int line);
void makeDisplay(Digit * d, const int line)
- OptimizeCompile . . . . 5 matches
'''Constant propagation'''
변수가 값을 할당 받아서, 다시 새로운 값으로 할당 받기 전까지, 그 변수는 일종의 constant 라고 볼 수 있다. 컴파일러는 이를 감지해서 최적화를 수행하게 된다.
''' Constant folding'''
연산에서 두개 이상의 constant 들은, 미리 계산되어 하나의 constant 값으로 바꿀 수 있다. 위의 예에 적용하자면
컴파일러는 constant propagation 과 constant folding 을 반복하여 수행한다. 각각 서로의 가능성을 만들어 줄 수 있으므로, 더이상 진행 할 수 없을 때까지 진행한다.
- [Lovely]boy^_^/USACO/YourRideIsHere . . . . 5 matches
bool IsSameCode(const string& comet, const string& group);
bool IsSameCode(const string& comet, const string& group)
basic_string<char>::const_iterator i;
- 몸짱프로젝트/BinarySearch . . . . 5 matches
const int SIZE = 10;
int search(const int aArr[], const int aNum, int front, int rear);
int search(const int aArr[], const int aNum, int front, int rear)
- 오목/재니형준원 . . . . 5 matches
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
// COmokView construction/destruction
void COmokView::AssertValid() const
void COmokView::Dump(CDumpContext& dc) const
- AcceleratedC++/Chapter2 . . . . 4 matches
const string greeting = "Hello, " + name + "!";
const int pad = 1;
const int rows = pad * 2 + 3;
const string::size_type cols = greeting.size() + pad * 2 + 2;
- BusSimulation/조현태 . . . . 4 matches
const int MOVE=1;
const int STOP=0;
const int MOVE=1;
const int STOP=0;
- C++스터디_2005여름/학점계산프로그램/문보창 . . . . 4 matches
static const int NUM_STUDENT; // 학생 수(상수 멤버)
const int CalculateGrade::NUM_STUDENT = 121;
static const int NUM_GRADE; // 과목 수 (상수 멤버)
const int Student::NUM_GRADE = 4;
- C++스터디_2005여름/학점계산프로그램/허아영 . . . . 4 matches
#include "const.h"
#include "const.h"
==== const.h ====
#include "const.h"
- CPPStudy_2005_1/STL성적처리_3 . . . . 4 matches
bool zcompare(const student_type ele1, const student_type ele2); //sort시 비교 조건
bool zcompare(const student_type ele1, const student_type ele2)
- CPPStudy_2005_1/STL성적처리_4 . . . . 4 matches
bool compare(const Student_info& student1, const Student_info& student2);
bool compare(const Student_info& student1, const Student_info& student2)
- CPP_Study_2005_1/Basic Bus Simulation/김태훈 . . . . 4 matches
const BUS_NO = 7;
void change_speed(const int n) { speed=n; }
float buspos(const int min,const int lanelen) {
- CheckTheCheck/문보창 . . . . 4 matches
const int MAX_CASE = 300;
const int TIED = -1;
const int BLACK = 0;
const int WHITE = 1;
- Gof/Command . . . . 4 matches
OpenCommand는 유저로부터 제공된 이름의 문서를 연다. OpenCommand는 반드시 Constructor에 Application 객체를 넘겨받아야 한다. AskUser 는 유저에게 열어야 할 문서의 이름을 묻는 루틴을 구현한다.
virtual const char* AskUser ();
const char* name = AskUser ();
PasteCommand 는 receiver로서 Document객체를 넘겨받아야 한다. receiver는 PasteCommand의 constructor의 parameter로서 받는다.
constructor는 receiver와 instance 변수에 대응되는 action을 저장한다. Execute는 단순히 action을 receiver에 적용한다.
- Gof/Mediator . . . . 4 matches
virtual const char* GetSelection();
virtual void SetText(const char* text);
virtual const char* GetText();
virtual void SetText(const char* text);
- Gof/Singleton . . . . 4 matches
static void Register (const char* name, Singleton*);
static Singleton* Lookup (const char* name);
const char* singletonName = getenv("SINGLETON");
const char* mazeStyle = getenv ("MAZESTYLE");
// Construction/Destruction
// Construction/Destruction
- Gof/Visitor . . . . 4 matches
Item CurrentItem () const;
const char* Name () { return _name; }
Equipment (const char*);
const char* _name;
- IndexedTree/권영기 . . . . 4 matches
void insert_item(node *current, int item, const int address, int st, int end, const int *count, const int *level){
const int maxcount = pow((double)2, level);
- MineSweeper/신재동 . . . . 4 matches
const int MINE = -1;
const int MOVE[3] = {-1, 0, 1};
bool isInBoard(int row, int col, int moveRow, int moveCol, const vector< vector<int> >& board)
void showBoard(const vector< vector<int> >& board)
- OurMajorLangIsCAndCPlusPlus/print/조현태 . . . . 4 matches
void print(const char* outData, ...)
fputs(va_arg(variables, const char*), stdout);
const char** variableStrings = va_arg(variables, const char**);
- ProgrammingLanguageClass/Report2002_1 . . . . 4 matches
| <constant>
<constant> → any decimal numbers
* <identifier>와 <constant>의 경우에는 찾아진 lexeme을 함께 출력한다.
<constant>: 428 parsed.
- STL/vector/CookBook . . . . 4 matches
Func(const Obj& obj)
Obj(int n, const string& str) : a(n), c(str) {}
* 노파심에서 말하는 건데.. 함수로 객체를 넘길때는 꼭 참조! 참조! 입니다. 값이 안 바뀌면 꼭 const 써주시구여. 참조 안 쓰고 값 쓰면 어떻게 되는지 이펙티브 C++에 잘 나와 있습니다.(책 선전 절대 아님) 복사 생성자를 10번 넘게 호출한다는 걸로 기억함.
* 구조체에서 함수역시 가능하고, constructor, destructor역시 가능합니다. 다만 class와 차이점은 상속이 안되고, 내부 필드들이 public으로 되어 있습니다. 상속이 안되서 파생하는 분제들에 관해서는 학교 C++교제 상속 부분과 virtual 함수 관련 부분의 동적 바인딩 부분을 참고 하시기 바람니다.--["상민"]
- TugOfWar/문보창 . . . . 4 matches
const int MAX_CASE = 100;
const int MAX = 100;
inline int comp(const void *i,const void *j) { return *(int *)i-*(int *)j; };
- [Lovely]boy^_^/USACO/BrokenNecklace . . . . 4 matches
const string CutAndPasteBack(const string& str, int pos);
const string CutAndPasteBack(const string& str, int pos)
- [Lovely]boy^_^/USACO/WhatTimeIsIt? . . . . 4 matches
int StringConvertToInt(const string& str);
string Upcase(const string& str);
string Upcase(const string& str)
int StringConvertToInt(const string& str)
- [Lovely]boy^_^/[Lovely]boy^_^/USACO/Barn . . . . 4 matches
vector<int> getDistance(const vector<int>& ar)
vector<int> getPivot(int numPivot, const vector<int>& distance)
int getTotal(int numPivot, const vector<int>& ar, const vector<int>& pivots)
- usa_selfish/김태진 . . . . 4 matches
int compare(const void* a,const void* b);
int compare(const void* a,const void* b)
- 문자반대출력/문보창 . . . . 4 matches
void write_file(const string & str);
void write_file(const string & str)
void write_file(const string & str);
void write_file(const string & str)
- 보드카페 관리 프로그램/강석우 . . . . 4 matches
int price(vector<board>& vec, int hour, int minute, const int& i);
const string tables[] ={"table1", "table2", "table3"};
const string games[] = {"jenga", "citadell", "pit"};
int price(vector<board>& vec, int hour, int minute, const int& i)
- 알고리즘8주숙제/문보창 . . . . 4 matches
bool operator() (const Data* a, const Data* b)
bool compare(const Data* a, const Data* b)
- 오목/휘동, 희경 . . . . 4 matches
const int size = 30;
const int room = 30;
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
- 이차함수그리기/조현태 . . . . 4 matches
const int MIN_X=-5;
const int MAX_X=5;
const float TAB_X=1;
const float TAB_Y=0.5;
- 진격의안드로이드&Java . . . . 4 matches
0: iconst_5
2: iconst_1
0: iconst_5
2: iconst_1
- 호너의법칙/조현태 . . . . 4 matches
const int INPUT_MAX=11;
const int SIZE_OF_LINE=5;
const int NUMBER_TO_CHAR=48;
const int SIZE_OF_BLOCK=4;
- BusSimulation/태훈zyint . . . . 3 matches
const int BusStationNo = 10; // 버스 정류장의 개수
const int BusNo = 10; // 버스의 대수
const long timerate = 1*60; // 시뮬레이터 할 때 한번 실행할 때마다 지나가는 시간
- C 스터디_2005여름/학점계산프로그램/김태훈김상섭 . . . . 3 matches
const int MAX_SUB = 4;
void getdata(vector<Score>& ban,const char* filename);
void getdata(vector<Score>& ban,const char* filename){
- CheckTheCheck/곽세환 . . . . 3 matches
const int EMPTY = 0;
const int BLACK = 1;
const int WHITE = 2;
- ContestScoreBoard/문보창 . . . . 3 matches
const int NUMBER_TEAM = 101;
const int NUMBER_PROBLEM = 10;
const int TIME_PENALTY = 20;
- Fmt/문보창 . . . . 3 matches
const int STATE_A = 1;
const int STATE_B = 2;
const int STATE_C = 3;
- HardcoreCppStudy/첫숙제/Overloading/임민수 . . . . 3 matches
int const arsize = 11;
const int max=20;
const int max=100;
- LearningToDrive . . . . 3 matches
I jerked back to attention as the car hit the gravel. My mom (her courage now amazes me) gently got the car back straight on the road. The she actually taught me about driving. "Driving is not about getting the car goint in the right direction. Driving is about constantly paying attention, making a little correction this way, a little correction that way."
This is the paradigm for XP. There is no such thing as straight and level. Even if things seem to be going perfectly, you don't take your eyes off the road. Change is the only constant. Always be prepared to move a little this way, a little that way. Sometimes maybe you have to move in a completely different direction. That's life as a programmer.
소프트웨어 개발을 운전을 배우는 것에 비유한 설명이 재미있네요. software project 의 Driver 는 customer 라는 말과.. Programmer 는 customer 에게 운전대를 주고, 그들에게 우리가 정확히 제대로 된 길에 있는지에 대해 feedback 을 주는 직업이라는 말이 인상적이여서. 그리고 customer 와 programmer 와의 의견이 수렴되어가는 과정이 머릿속으로 그려지는 것이 나름대로 인상적인중. 그리고 'Change is the only constant. Always be prepared to move a little this way, a little that way. Sometimes maybe you have to move in a completely different direction. That's life as a programmer.' 부분도.. 아.. 부지런해야 할 프로그래머. --;
- MoreEffectiveC++ . . . . 3 matches
* Item 4: Avoid gratuitous default constructors. - 암시적으로 제공되는 기본 생성자를 피하라. 혹은 기본 생성자의 모호성을 파악하라.
* Item 10: Prevent resource leaks in constructors. - 생성자에서 자원이 세는걸 막아라.
* Item 25: Virtualizing constructors and non-member functions. - 생성자와 비멤버 함수를 가상으로 돌아가게 하기.
- OurMajorLangIsCAndCPlusPlus/2006.2.06/하기웅 . . . . 3 matches
int length() const
ostream& operator << (ostream& o, const newstring& ns)
const newstring s="123";
- PascalTriangle . . . . 3 matches
const int pas(const int &m,const int &n)
- Refactoring/OrganizingData . . . . 3 matches
* You have two classes that need to use each other's features, but there is only a one-way link.[[BR]]''Add back pointers, and change modifiers to update both sets.''
== Replace Magic Number with Symbolic Constant p204 ==
* You have a literal number with a paricular meaning. [[BR]] ''Crate a constant, name it after the meaning, and replace the number with it.''
return mass * GRAVITATION_CONSTNAT * height;
static final double GRAVITATIONAL_CONSTANT = 9,81;
* You have subclasses that vary only in methods that return constant data.[[BR]]''Change the mehtods to superclass fields and eliminate the subclasses.''
- STL/vector . . . . 3 matches
vector<int>::const_iterator i; // 벡터의 내용을 변경하지 않을 것임을 보장하는 반복자.
vector<int>::const_iterator i;
typedef vecCont::const_iterator vecIter;
- STLErrorDecryptor . . . . 3 matches
error C2664: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string(const std::basic_string<_Elem,_Traits,_Ax>::_Alloc &) with [_Elem=char,_Traits=std::char_traits<char>,_Ax=std::allocator<char>]' : 매개 변수 1을(를) 'int'에서 'const std::basic_string<_Elem,_Traits,_Ax>::_Alloc & with [_Elem=char,_Traits=std::char_traits<char>,_Ax=std::allocator<char>]'(으)로 변환할 수 없습니다.; 원인: 'int'에서 'const std::basic_string<_Elem,_Traits,_Ax>::_Alloc with [_Elem=char,_Traits=std::char_traits<char>,_Ax=std::allocator<char>]'(으)로 변환할 수 없습니다.; 소스 형식을 가져올 수 있는 생성자가 없거나 생성자 오버로드 확인이 모호합니다.
- ScheduledWalk/욱주&민수 . . . . 3 matches
const int Size=6;
//const int startX=startx;
//const int startY=starty;
- TheKnightsOfTheRoundTable/문보창 . . . . 3 matches
void process(const double a, const double b, const double c)
- UglyNumbers/문보창 . . . . 3 matches
const int MAX = 2000;
inline int comp(const void *i,const void *j) { return *(int *)i-*(int *)j; };
- WeightsAndMeasures/김상섭 . . . . 3 matches
const int maxweight = 10000000;
bool compare(const turtle & a, const turtle & b)
- Yggdrasil/가속된씨플플/2장 . . . . 3 matches
const string greeting="Hello, "+name+"!";
const int rows=pad_rows*2+3;
const string::size_type cols=greeting.size()+pad_cols*2+2;
- Yggdrasil/가속된씨플플/4장 . . . . 3 matches
* 참조에 의한 전달은 그 전달인자의 별명(?)을 넘겨준다. 즉 그 변수 자체를 넘겨주는 것이나 다름없다. 즉, 함수 내에서 그 전달인자로 전달된 변수가 바뀌면 원래의 값에도 변화가 온다. 그래서 적절히 const로 값이 바뀌지 않도록 제한해주는 것도 좋다. 복사를 안 하므로 오버헤드를 줄일 수 있음.
bool compare(const Student_info& x, const Student_info& y)
- i++VS++i . . . . 3 matches
const MyInteger MyInteger::operator++(int) // 후위증가. 전달인자로 int 가 있지만
const MyInteger oldValue = *this;
static const int MAX = 5;
- randomwalk/홍선 . . . . 3 matches
const int Direction = 8; // 바퀴벌레가 움직이는 8방향
const int imove[8] = {-1,0,1,1,1,0,-1,-1}; // 바퀴벌레가 움직이는 방향의 x 좌표 증감
const int jmove[8] = {1,1,1,0,-1,-1,-1,0}; // 바퀴벌레가 움직이는 방향의 y 좌표 증감
- 논문번역/2012년스터디/이민석 . . . . 3 matches
* 「Experiments in Unconstrained Offline Handwritten Text Recognition」 번역
== Experiments in Unconstrained Offline Handwritten Text Recognition(제약 없는 오프라인 필기 글자 인식에 관한 실험) ==
필기 글자 인식은 패턴 인식의 도전적인 분야다. 지금까지의 오프라인 필기 인식 시스템들은 대부분 우편 주소 읽기나 은행 수표 같은 형식을 처리하는 데 적용되었다. [14] 이들 시스템이 개별 글자나 단어 인식에 한정된 반면 제약 없는(unconstrained) 필기 글자 인식을 위한 시스템은 거의 없다. 그 이유는 이러한 작업이 크게 복잡하기 때문인데 글자 또는 단어의 경계에 대한 정보가 없는 데다 헤아릴 수 없을 정도로 어휘가 방대한 것이 특징이다. 그럼에도 필기 글자 인식 기법을 더 조사하는 것이 가치 있는 이유는, 계산 능력이 향삼함에 따라 더욱 복잡한 처리를 할 수 있기 때문이다.
- 니젤프림/BuilderPattern . . . . 3 matches
쉽게 말해서, 아주 복잡한 오브젝트를 생성해야하는데, 그 일을 오브젝트를 원하는 클래스가 하는게 아니라, Builder 에게 시키는 것이다. 그런데 자꾸 나오는 생성/표현 의 의미는, 바로 director 의 존재를 설명해 준다고 할 수 있다. director 는 Building step(construction process) 을 정의하고 concrete builder 는 product 의 구체적인 표현(representation) 을 정의하기에.. 그리고, builder 가 추상적인 인터페이스를 제공하므로 director 는 그것을 이용하는 것이다.
public void constructPizza() {
waiter.constructPizza();
- 로마숫자바꾸기/조현태 . . . . 3 matches
const int DATA_SIZE=3;
const int NUMBER_DATA[DATA_SIZE]={1,5,10};
const char CHAR_DATA[DATA_SIZE][3]={"Ⅰ","Ⅴ","Ⅹ"};
- 몸짱프로젝트/DisplayPumutation . . . . 3 matches
void perm(char * list, int i , const int n);
const int SIZE = 4;
void perm(char * list, int i , const int n)
- 몸짱프로젝트/Maze . . . . 3 matches
const int M = 7;
const int P = 7;
const int MAX = M*P;
- 문자열검색/조현태 . . . . 3 matches
const int MAX_LONG=40;
const int TRUE=1;
const int FALSE=0;
- 미로찾기/영동 . . . . 3 matches
//Constant values about direction
const int MOVE_X[DIRECTION]={0, 1, 0, -1};
const int MOVE_Y[DIRECTION]={-1, 0, 1, 0};
//Constant Values about maze[][] and mark[][]
{//Constructor with initial data
Element(){}//Default constructor
- 반복문자열/임다찬 . . . . 3 matches
const에 대해서 배웠다면 char* 대신에 const char*를 사용하는 것이 좋습니다.-- [Leonardong]
const char*는 사용안해봤어요- [임다찬]
- 새싹교실/2011/Noname . . . . 3 matches
case constant-expression :
case constant-expression :
case constant-expression :
- 새싹교실/2012/AClass . . . . 3 matches
* cmd창, main parameter사용법, static, const
* static, const 이란??
* [황혜림] - 상속배웠습니다. protected가 무엇인지 배웠고 오버로딩, 오버라이딩이 무엇인지도 배웠습니다. static과 const도 배웠습니다.
- 서로간의 참조 . . . . 3 matches
CView* GetActiveView() const;
CFrameWnd* GetParentFrame() const;
CDocument* GetDocument() const;
- 서지혜/단어장 . . . . 3 matches
'''constrain'''
constrain a person from doing
남에게 ~하지 못하게 하다 : With the exception of some sports, no characteristic of brain or body constrains an individual from reaching an expert level.
- 식인종과선교사문제/조현태 . . . . 3 matches
const int NUMBER_MOVE_TYPE = 5;
const int CAN_MOVE_WHITE[NUMBER_MOVE_TYPE] = {0, 0, 1, 1, 2};
const int CAN_MOVE_BLACK[NUMBER_MOVE_TYPE] = {1, 2, 0, 1, 0};
- 임베디드방향과가능성/정보 . . . . 3 matches
둘째로 기술적으로 말씀드리죠. pc의 경우는 application만 하면 됩니다. 그 좋은 visual tool들이 hw specific한 부분과 커널 관련한 부분은 다 알아서 처리해 줍니다. 하지만 임베디드 분야는 이 부분을 엔지니어가 다 알아서 해야 하죠. pc의 경우 windows를 알 필요없지만 임베디드 엔지니어는 os kernel을 만드시 안고 들어가야 합니다. 이 뿐만 아니라 application specific/implementation specific하기 때문에 해당 응용분야에 대한 지식도 가지고 있어야 하며/ 많은constraint 때문에 implementation 할 때hw/sw에 관한 지식도 많아야 하죠. 경우에 따라서는 chip design 분야와 접목될 수도 있습니다.(개인적으로 fpga 분야가 활성화 된다면 fpga도 임베디드와 바로 엮어질거라 생각합니다. 이른바 SoC+임베디드죠. SoC가 쓰이는 분야의 대부분 곧 임베디드 기기일 겁니다. ASIC도 application specific하다는 점에서 임베디드 기기와 성질이 비슷하고 asic의 타겟은 대부분 임베디드 기기입니다.) 대부분의 비메모리 반도체칩은 그 용도가 정해져있으며, 비메모리 반도체를 사용하는(혹은 설계하는 사람)을 두고 임베디드 엔지니어라 할 수 있죠. 사실 임베디드는 범위가 매우 넓기 때문에 한가지로 한정하기 힘듭니다.
한마디 더 추가하겠습니다. constraint가 거의 없는 시스템이 pc입니다. (단순pc라면 200만원대 이하가 유일한 조건인가요..? 특별한 작업을 위한 시스템이면 수천만원도 가능하겠군요) 하지만 임베디드 시스템은 많은 constraint가 존재합니다. 크기,무게,가격,온도,습도,처리량,time-to-market 등등..
- 정모/2013.5.6/CodeRace . . . . 3 matches
int main(int argc, const char * argv[])
int main(int argc, const char * argv[])
int main(int argc, const char * argv[]) {
- 토이/숫자뒤집기/김남훈 . . . . 3 matches
const int MAX_BUF = 10;
void inverseNumber(const char * input);
void inverseNumber(const char * input) {
- 3N 1/김상섭 . . . . 2 matches
const int Min = 1;
const int Max = 1000000;
- 3N+1/김상섭 . . . . 2 matches
const int Min = 1;
const int Max = 1000000;
- ACE/CallbackExample . . . . 2 matches
const ACE_TCHAR *prio_name = ACE_Log_Record::priority_name(prio);
const time_t epoch = log_record.time_stamp().sec();
- AcceleratedC++/Chapter3 . . . . 2 matches
const string greeting = "Hello, " + name + "!";
const string greeting = "Hello, " + name + "!";
- BeeMaja/조현태 . . . . 2 matches
const int PLUS_X[6] = {-1, +0, +1, +1, +0, -1};
const int PLUS_Y[6] = {+0, -1, -1, +0, +1, +1};
- C++스터디_2005여름/도서관리프로그램/조현태 . . . . 2 matches
const char output_data[2][5]={"대여","반납"};
const int MAX_HANGMOK=4;
- CPPStudy_2005_1/STL성적처리_1_class . . . . 2 matches
for(vector<string>::const_iterator it = subject.begin() ;
for(vector<int>::const_iterator it2 = scores.begin();it2!=scores.end();++it2)
- CarmichaelNumbers/문보창 . . . . 2 matches
const int NORMAL = 1;
const int CARMICHAEL = 2;
- CarmichaelNumbers/조현태 . . . . 2 matches
const int MINIMUM=2;
const int MAXIMUM=65000;
- ChocolateChipCookies/조현태 . . . . 2 matches
bool operator == (const SMyPoint& target)
const double MAX_LEGTH = 5.0;
- CivaProject . . . . 2 matches
const ElementType operator[] (int index) const throw() {
- ClassifyByAnagram/인수 . . . . 2 matches
void CalWhatAnagram(const string& str)
MCI CalculateWhatAnagram(const string& str)
- CodeRace/20060105/아영보창 . . . . 2 matches
bool operator() (const Word* a, const Word* b)
- CryptKicker2/문보창 . . . . 2 matches
const int MAX_LEN = 81;
const int PROPER_LEN = 43;
- DesignPatternsAsAPathToConceptualIntegrity . . . . 2 matches
This is what Brooks wrote 25 years ago. "… Conceptual integrity is the most important consideration in system design."[Brooks 86] He continues: “The dilemma is a cruel one. For efficiency and conceptual integrity, one prefers a few good minds doing design and construction. Yet for large systems one wants a way to bring considerable manpower to bear, so that the product can make a timely appearance. How can these two needs be reconciled?”
The dilemma is a cruel one. For efficiency and conceptual integrity, one prefers a few good minds doing design and construction. Yet for large systems one wants a way to bring considerable manpower to bear, so that the product can make a timely appearance. How can these two needs be reconciled?
- EightQueenProblem/da_answer . . . . 2 matches
const
const
- ErdosNumbers/문보창 . . . . 2 matches
const int MAX_STR = 20;
const int MAX_ERNUM = 100;
- Graphical Editor/Celfin . . . . 2 matches
const int PLUS_X[8] = {+0, +1, +1, +1, +0, -1, -1, -1};
const int PLUS_Y[8] = {+1, +1, +0, -1, -1, -1, +0, 1};
- Hartals/조현태 . . . . 2 matches
const int NUMBER_NOMAL_DAY=2;
const int NOMAL_DAYS[NUMBER_NOMAL_DAY]={6,7};
- HowToStudyDesignPatterns . . . . 2 matches
내가 여러분에게 "주석문을 가능하면 쓰지 않는 것이 더 좋다"라는 이야기를 했을 때 이 문장을 하나의 사실로 받아들이고 기억하면 그 시점 당장에는 학습이 일어나지 않는다고 봅니다. 대신 여러분이 차후에 여러가지 경험을 하면서도 이 화두를 놓치지 않고 있다가 어느 순간엔가, "아!!! 그래 주석문을 쓰지 않는게 좋겠구나!!"하고 자각하는 순간, 바로 그 시점에 학습이, 교육이 이뤄지는 것입니다. 이는 기본적으로 컨스트럭티비즘이라고 하는 삐아제와 비곳스키의 철학을 따르는 것이죠. 지식이란 외부에서 입력받는 것이 아니고, 그것에 대한 모델을 학습자 스스로가 내부에서 축조(construct)할 때 획득할 수 있는 것이라는 철학이죠.
어떤 특정 문장 구조(as much as ...나, no more than ... 같은)를 학습하는데 최선은 그 문장 구조를 이용한 실제 문장을 나에게 의미있는 실 컨텍스트 속에서 많이 접하고 스스로 나름의 모델을 구축(constructivism)하여 교과서의 법칙에 "기쁨에 찬 동의"를 하는 것입니다.
- InternalLinkage . . . . 2 matches
Except for the first time through this function (when p must be constructed), this is a one-line function — it consists entirely of the statement "return p;". If ever there were a good candidate for inlining, this function would certainly seem to be the one. Yet it's not declared inline. Why not? ¤ Item M26, P18
와 같은 의미가 된다. 이것은 inline 으로 선언할거리가 될것 같기도 하지만 inline 으로 선언되지 않았다. 왜일까? (Except for the first time through this function (when p must be constructed), this is a one-line function — it consists entirely of the statement "return p;". If ever there were a good candidate for inlining, this function would certainly seem to be the one. Yet it's not declared inline. Why not? )
- JollyJumpers/이승한 . . . . 2 matches
const int MAX = 3000;
const int MAXLine = 10;
- LinkedList/영동 . . . . 2 matches
Node(int initialData){ //Constructor with initializing data
Node(){} //An empty constructor to reduce warning in compile time
Node(int initialData){ //Constructor with initializing data
Node(){nextNode='\0';} //An empty constructor to reduce warning in compile time
- LinuxProgramming/QueryDomainname . . . . 2 matches
void error_handling(const char* message);
void error_handling(const char* message)
- LoveCalculator/zyint . . . . 2 matches
size_t strlen(const string str);
size_t strlen(const string str)
- Marbles/문보창 . . . . 2 matches
const int TYPE1 = 1;
const int TYPE2 = 2;
- Marbles/조현태 . . . . 2 matches
const int FALSE=-1;
const int TRUE=0;
- Monocycle/조현태 . . . . 2 matches
const int MOVE_PLUS_X[4] = {0, 1, 0, -1};
const int MOVE_PLUS_Y[4] = {-1, 0, 1, 0};
- OurMajorLangIsCAndCPlusPlus/Function . . . . 2 matches
template<> void print<const char *>(const char *a)
- OurMajorLangIsCAndCPlusPlus/print/이도현 . . . . 2 matches
void print(const char *, ...);
void print(const char *arg, ...)
- OurMajorLangIsCAndCPlusPlus/print/이상규 . . . . 2 matches
void print(const char *format, ...)
const char *c = format;
- Plugin/Chrome/네이버사전 . . . . 2 matches
img.src = constructImageURL(photo);
function constructImageURL(photo) {
- RandomWalk/황재선 . . . . 2 matches
const int rowMax = 40;
const int colMax = 20;
- Refactoring/DealingWithGeneralization . . . . 2 matches
== Pull Up Constructor Body ==
* You have constructors on subclasses with mostly identical bodies.[[BR]]''Create a superclass constructor; class this from the subclass methods.''
- Refactoring/MakingMethodCallsSimpler . . . . 2 matches
== Separate Query from Modifier ==
http://zeropage.org/~reset/zb/data/SeparateQueryFromModifier.gif
== Replace Constructor with Factory Method ==
You want to do more that simple construction when you create an object.
''Replace the constructor with a factory method''
- Robbery/조현태 . . . . 2 matches
const int ADD_POINT_X[5] = {0, +1, -1, 0, 0};
const int ADD_POINT_Y[5] = {0, 0, 0, +1, -1};
- Shoemaker's_Problem/곽병학 . . . . 2 matches
bool operator() (const ps &s1, const ps &s2) {
- SmithNumbers/신재동 . . . . 2 matches
const int MAX_TEST = 100;
const int MAX_PRIME_NUMBER = 100000;
- TestDrivenDevelopment . . . . 2 matches
void AssertImpl( bool condition, const char* condStr, int lineNum, const char* fileName)
- UDK/2012년스터디/소스 . . . . 2 matches
// Its behavior is similarly to constructor.
event PlayerController Login(string portal, string options, const UniqueNetId uniqueID, out string errorMsg)
- UnixSocketProgrammingAndWindowsImplementation . . . . 2 matches
ssize_t send(int fildes, const void * buf, size_t nbytes, unsigned int flags);
ssize_t write(int fildes, const void * buf, size_t nbytes);
- WeightsAndMeasures/문보창 . . . . 2 matches
bool turtleGreater(const Turtle& A, const Turtle& B)
- neocoin/CodeScrap . . . . 2 matches
static const int INIT_START;
const int Board::INIT_START = 0;
- 간단한C언어문제 . . . . 2 matches
const char *a;
옳지 않다. 문제점은 b=a;에 있다. const char *형을 char *형에 대입할 수 없다. 컴파일러 에러. - [이영호]
- 개인키,공개키/김태훈,황재선 . . . . 2 matches
const int KEY = 112;
const int KEY = 156;
- 개인키,공개키/김회영,권정욱 . . . . 2 matches
const int key = 50;
const int askii = 256;
- 데블스캠프2010/일반리스트 . . . . 2 matches
int fn_qsort_intcmp( const void *a, const void *b )
- 몸짱프로젝트/HanoiProblem . . . . 2 matches
void hanoi(const int n, int x, int y, int z);
void hanoi(const int n, int x, int y, int z)
- 몸짱프로젝트/InfixToPostfix . . . . 2 matches
const int LEN = 4;
const int MAX = 10;
- 문자반대출력/조현태 . . . . 2 matches
const bool TRUE=1;
const bool FALSE=0;
- 미로찾기/곽세환 . . . . 2 matches
const int Max_x = 30;
const int Max_y = 20;
- 미로찾기/정수민 . . . . 2 matches
const int miro[13][17]={
const int miro[13][17]={
- 반복문자열/허아영 . . . . 2 matches
void printMessages(const char* message, int messageLength);
void printMessages(const char* message, int messageLength)
- 변준원 . . . . 2 matches
const int max=5;
const int max=5;
- 빵페이지/도형그리기 . . . . 2 matches
const char star = '*';
const char space = ' ';
- 새싹교실/2012/AClass/1회차 . . . . 2 matches
-상수형 :상수는 변환 할 수 없는 고유의 수, 프로그램을 개발할 때 변경되어 발생 할 수 있는 버그등의 위험을 줄이기 위해 사용(#define,const)
- const int max=100; (int형 상수 max를 100으로 선언), #define AA 35(형태를 지정하지 않는 상수명 AA에 정수형 값을 대입)
- 새싹교실/2012/주먹밥/이소라때리기게임 . . . . 2 matches
const SELECT menu[SKILLSIZE] ={
const CLASS classList[CLASSSIZE]= {
- 손동일 . . . . 2 matches
const int Max = 11 ;
const int MAX = 11;
- 손동일/TelephoneBook . . . . 2 matches
const char *filename = "text.txt";
const int base_save = 4; // 처음 기본으로 저장되어있는 전화번호 숫자.
- 스네이크바이트/C++ . . . . 2 matches
const int numberOfStudent = 10;//학생 수
const int b = 10;
- 이영호/My라이브러리 . . . . 2 matches
int send_msg(int sockfd, const *msg);
int send_msg(int sockfd, const *msg)
- 이영호/숫자를한글로바꾸기 . . . . 2 matches
성공시 const char * 리턴
const char *change(int num)
- 중위수구하기/조현태 . . . . 2 matches
const int MAX_NUMBER=3;
const int BREAK_NUMBER=-999;
- 큐와 스택/문원명 . . . . 2 matches
const int ASIZE = 5;
const int ASIZE = 5;
- 큰수찾아저장하기/조현태 . . . . 2 matches
const int MAX_GARO=4;
const int MAX_SAERO=4;
- 헝가리안표기법 . . . . 2 matches
|| k || constant formal parameter || ... || void vFunc(const long klGalaxies) ||
- 05학번만의C++Study/숙제제출4/조현태 . . . . 1 match
const int MAX_CLASS=255;
- 5인용C++스터디/더블버퍼링 . . . . 1 match
// TODO: add construction code here
- 5인용C++스터디/에디트박스와콤보박스 . . . . 1 match
BOOL Create(DWORD dwstyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
- 8queen/곽세환 . . . . 1 match
const int Max = 8;
- AcceleratedC++/Chapter6/Code . . . . 1 match
double optimistic_median_analysis(const vector<Student_info> &students)
- AutomatedJudgeScript/문보창 . . . . 1 match
const int MAX = 100;
- BoaConstructor . . . . 1 match
http://boa-constructor.sourceforge.net/
GUI 를 만들어 Boa 요~ - BoaConstructor
- CPPStudy_2005_1/STL성적처리_3_class . . . . 1 match
const int SUBJECT_NO = 4;
- CToAssembly . . . . 1 match
문장 foo: .long 10은 foo라는 4 바이트 덩어리를 정의하고, 이 덩어리를 10으로 초기화한다. 지시어 .globl foo는 다른 파일에서도 foo를 접근할 수 있도록 한다. 이제 이것을 살펴보자. 문장 int foo를 static int foo로 수정한다. 어셈블리코드가 어떻게 살펴봐라. 어셈블러 지시어 .globl이 빠진 것을 확인할 수 있다. (double, long, short, const 등) 다른 storage class에 대해서도 시도해보라.
- CommonPermutation/문보창 . . . . 1 match
const int MAX = 1000;
- ComputerNetworkClass/Report2006/PacketAnalyzer . . . . 1 match
const char* szIpAddr to DWORD ipvalue
- ContestScoreBoard/신재동 . . . . 1 match
const int MAX_TEAM = 100;
- ContestScoreBoard/조현태 . . . . 1 match
const int WRONG_TIME=20;
- CuttingSticks/문보창 . . . . 1 match
void show(const int result)
- DirectDraw/DDUtil . . . . 1 match
CreatePaletteFromBitmap( LPDIRECTDRAWPALETTE *ppPalette, const TCHAR *strBMP)
- EightQueenProblem . . . . 1 match
* 이미 만들어진 종적 상태의 프로그램에서보다 그것을 전혀 모르는 상태에서 직접 축조(construct)해 나가는 과정에서 배우는 것이 훨씬 더 많고, 재미있으며, 효율적인 학습이 된다는 것을 느끼게 해주기 위해
- EightQueenProblem/강인수 . . . . 1 match
const int N = 8;
- FOURGODS/김태진 . . . . 1 match
int main(int argc, const char * argv[])
- FromDuskTillDawn/변형진 . . . . 1 match
function __construct()
- Functor . . . . 1 match
A function object, often called a functor, is a computer programming construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax. The exact meaning may vary among programming languages. A functor used in this manner in computing bears little relation to the term functor as used in the mathematical field of category theory.
- Garbage collector for C and C++ . . . . 1 match
# is normally more than one byte due to alignment constraints.)
- HardcoreCppStudy/첫숙제/Overloading/김아영 . . . . 1 match
const int MAX = 20;
- HowManyZerosAndDigits/허아영 . . . . 1 match
unsigned int factorial(const unsigned int &num)
- HowToStudyDataStructureAndAlgorithms . . . . 1 match
교육은 물고기를 잡는 방법을 가르쳐주어야 한다. 어떤 알고리즘을 배운다면, 그 알고리즘을 고안해 낸 사람이 어떤 사고의 과정을 거쳐서 그 해법에 도달했는지를 구경할 수 있어야 하고, 학생은 각자 스스로만의 해법을 차근 차근 "구성"(construct)할 수 있어야 한다(이를 교육철학에서 구성주의라고 하는데, 레고의 아버지이고 마빈 민스키와 함께 MIT 미디어랩의 선구자인 세이머 페퍼트 박사가 주창했다). 전문가가 하는 것을 배우지 말고, 그들이 어떻게 전문가가 되었는가를 배우고 흉내내라.
- ImmediateDecodability/문보창 . . . . 1 match
const int MAX = 10;
- IntentionRevealingMessage . . . . 1 match
bool operator==(const Object& other)
- JavaScript/2011년스터디/서지혜 . . . . 1 match
Child.prototype.constructor = Child;
- JollyJumpers/문보창 . . . . 1 match
const int MAX = 3000;
- JollyJumpers/오승균 . . . . 1 match
const int size = 65535;
- JumpJump/김태진 . . . . 1 match
int main(int argc, const char * argv[])
- LC-Display/상협재동 . . . . 1 match
const int MAX_TESTCASE = 10;
- Marbles/신재동 . . . . 1 match
const int MAX_NUMBER = 1000;
- MatrixAndQuaternionsFaq . . . . 1 match
Note that an additional row of constant terms is added to the vector
- MineFinder . . . . 1 match
326.552 0.1 326.552 0.1 221 CWnd::SetWindowTextA(char const *) (mfc42d.dll)
- MineSweeper/문보창 . . . . 1 match
const int MAX = 100;
- MultiplyingByRotation/곽세환 . . . . 1 match
const int MAX = 20; // 최대 20자리까지
- NSIS/Reference . . . . 1 match
=== constant variables that are usable in Instructions and InstallDir ===
- OurMajorLangIsCAndCPlusPlus/XML/김상섭허준수 . . . . 1 match
tree_pointer tree_make(const char * file)
- OurMajorLangIsCAndCPlusPlus/math.h . . . . 1 match
||double atof ( const char * string ) || 문자열을 실수형으로 변형시킨다||
- OurMajorLangIsCAndCPlusPlus/print . . . . 1 match
void print(const char *, ...);
- OurMajorLangIsCAndCPlusPlus/print/허준수 . . . . 1 match
void print(const char* first,...)
- POLY/김태진 . . . . 1 match
int main(int argc, const char * argv[])
- PPProject/20041001FM . . . . 1 match
const int SIZE = strlen(string);
- PowerOfCryptography/문보창 . . . . 1 match
const int LEN = 1001;
- PrimeNumberPractice . . . . 1 match
const int scope = 2000;
- ProgrammingPearls/Column3 . . . . 1 match
const int NUM_ITEMS = 10;
- ProjectEazy/테스트문장 . . . . 1 match
|| MODP(modifier phrase)|| 관형구 ||
- PyIde . . . . 1 match
* BoaConstructor - http://boa-constructor.sourceforge.net/
* BoaConstructor - Scintilla 가 사용된 예를 볼 수 있다.
- PyUnit . . . . 1 match
인스턴스를 생성할때 우리는 그 테스트 인스턴스가 수행할 테스트 메소드를 구체적으로 명시해주어야 한다. 이 일은 constructor에 메소드 이름을 적어주면 된다.
- RandomWalk/김아영 . . . . 1 match
const int max = 12;
- RandomWalk/변준원 . . . . 1 match
const int max=5;
- RandomWalk/이진훈 . . . . 1 match
const int Arsize = 3;
- RandomWalk/임민수 . . . . 1 match
int const arsize = 11;
- RandomWalk/임인택 . . . . 1 match
const int DIRECTION = 8;
- RandomWalk2/Leonardong . . . . 1 match
const int Asize = 3;
- ReverseAndAdd/이승한 . . . . 1 match
const int TEN = 10;
- STL/list . . . . 1 match
const int INDEX_MAX = 5;
- SmithNumbers/김태진 . . . . 1 match
int main(int argc, const char * argv[])
- SmithNumbers/조현태 . . . . 1 match
const int MAX_NUMBER=10000000;
- StacksOfFlapjacks/조현태 . . . . 1 match
const int SIZE_BUFFER=100;
- StructuredText . . . . 1 match
Special symbology is used to indicate special constructs:
- SummationOfFourPrimes/문보창 . . . . 1 match
const int MAX = 450;
- TermProject/재니 . . . . 1 match
const int students = 20;
- TheGrandDinner/조현태 . . . . 1 match
const char DEBUG_INPUT[] = "4 5\n4 5 3 5\n3 5 2 6 4\n4 5\n4 5 3 5\n3 5 2 6 3\n0 0\n";
- TugOfWar/이승한 . . . . 1 match
const int MAX= 100;
- UML . . . . 1 match
In software engineering, Unified Modeling Language (UML) is a non-proprietary, third generation modeling and specification language. However, the use of UML is not restricted to model software. It can be used for modeling hardware (engineering systems) and is commonly used for business process modeling, organizational structure, and systems engineering modeling. The UML is an open method used to specify, visualize, construct, and document the artifacts of an object-oriented software-intensive system under development. The UML represents a compilation of best engineering practices which have proven to be successful in modeling large, complex systems, especially at the architectural level.
- UglyNumbers/송지원 . . . . 1 match
const int MAX = 1500;
- WOWAddOn/2011년프로젝트/초성퀴즈 . . . . 1 match
http://www.wowwiki.com/WoW_constants
- XOR삼각형/aekae . . . . 1 match
const int MAX = 8;
- XOR삼각형/이태양 . . . . 1 match
const MAX = 100;
- XOR삼각형/임다찬 . . . . 1 match
const int MAX=50;
- ZeroPage_200_OK/소스 . . . . 1 match
<table border="1" style="margin: 10px;" summary="books_const">
- [Lovely]boy^_^/Arcanoid . . . . 1 match
* I don't want pointers in container, so I had to make a copy constructor, substitute operator.--;
- gusul/김태진 . . . . 1 match
int main(int argc, const char * argv[])
- wxPython . . . . 1 match
* [http://sourceforge.net/projects/boa-constructor BoaConstructor] - wxPython 기반의 GUI IDE. 잠깐 써봤는데 대단대단! (단, 아직은 불안정함)
- zennith/ls . . . . 1 match
void myStrCat(char * dest, const char * source) {
- 강희경/메모장 . . . . 1 match
const int beveragePrice[3] = {100, 200, 300};
- 논문번역/2012년스터디 . . . . 1 match
* Experiments in Unconstrained Offline Handwritten Text Recognition
- 단어순서/방선희 . . . . 1 match
const int Max=20;
- 데블스캠프2006/목요일/winapi . . . . 1 match
static const int BUTTON_ID = 1000;
- 데블스캠프2006/화요일/tar/나휘동 . . . . 1 match
const int MAX_BUF= 1024;
- 데블스캠프2009/목요일/연습문제/MFC/송지원 . . . . 1 match
// Construction
CTestDlg(CWnd* pParent = NULL); // standard constructor
- 데블스캠프2011/다섯째날/HowToWriteCodeWell/김준석,서영주 . . . . 1 match
// TODO Auto-generated constructor stub
- 데블스캠프2011/셋째날/후기 . . . . 1 match
* 그냥 값을 가지게 하는 식이라면 어떻게든 비슷하게는 만들겠지만 불변객체로 만들라는 부분이나 const 사용 등을 고려하려고 하니까 힘들어지네요. 게다가 함수도 몇 개 못만들고... -_- 평소에 쓰는 string 클래스의 고마움을 절실히 느꼈습니다.
- 랜웍/이진훈 . . . . 1 match
const int Arsize = 3;
- 마방진/Leonardong . . . . 1 match
const int Asize=19;
- 마방진/임민수 . . . . 1 match
int const arsize = 11;
- 몸짱프로젝트/BubbleSort . . . . 1 match
const int SIZE = 10;
- 몸짱프로젝트/CrossReference . . . . 1 match
const int MAX_LEN = 20;
- 복사생성자 . . . . 1 match
2. const 로 정의
- 빵페이지/마방진 . . . . 1 match
const int c = 15; // 3*3마방진의 각 줄의 합
- 새싹C스터디2005/선생님페이지 . . . . 1 match
교육은 물고기를 잡는 방법을 가르쳐야 합니다. 어떤 알고리즘을 배운다면 그 알고리즘을 고안해낸 사람이 어떤 사고 과정을 거쳐 그 해법에 도달했는지를 구경할 수 있어야 하고, 학생은 각자 스스로만의 해법을 차근차근 '구성'(construct)할 수 있어야 합니다 (이를 교육철학에서 구성주의라고 합니다. 교육철학자 삐아제(Jean Piaget)의 제자이자, 마빈 민스키와 함께 MIT 미디어랩의 선구자인 세이머 페퍼트 박사가 주창했습니다). 전문가가 하는 것을 배우지 말고, 그들이 어떻게 전문가가 되었는지를 배우고 흉내 내야 합니다. 결국은 소크라테스적인 대화법입니다. 해답을 가르쳐 주지 않으면서도 초등학교 학생이 자신이 가진 지식만으로 스스로 퀵소트를 유도할 수 있도록 옆에서 도와줄 수 있습니까? 이것이 우리 스스로와 교사들에게 물어야 할 질문입니다.
- 새싹교실/2011 . . . . 1 match
constant/variable->variable: 논리회로와 연관시키면 은근히 편함
- 새싹교실/2011/데미안반 . . . . 1 match
* [이준영] - 오늘 심볼릭 상수를 배웠습니다. const랑 define을 배웠어요. 먼지는 모르겠지만 나중에 암기하도록 하겠습니다.
- 새싹교실/2012/앞부분만본반 . . . . 1 match
variable,coefficient,constant에 대해서 설명.
- 서지혜 . . . . 1 match
* '''의도적 수련'''에서 영감을 받아 시작하기로 한 reconstitution project
- 수학의정석/방정식/조현태 . . . . 1 match
const int MINUTE=60;
- 수학의정석/행렬/조현태 . . . . 1 match
const int BAE_YOL_SU=2;
- 스택/Leonardong . . . . 1 match
const int Asize = 3;
- 시간맞추기/조현태 . . . . 1 match
const int ANSWER_TIME=8;
- 식인종과선교사문제/변형진 . . . . 1 match
function __construct()
- 안혁준/class.js . . . . 1 match
proto.constructor = this;
- 이승한/java . . . . 1 match
goto, const 는 사용하지 못한다.
- 자료병합하기/조현태 . . . . 1 match
const int END_OF_DATA=99;
- 정렬/Leonardong . . . . 1 match
const int Asize=10000;
- 정렬/곽세환 . . . . 1 match
const int size = 10000;
- 정렬/방선희 . . . . 1 match
const int Max = 10000;
- 정렬/조재화 . . . . 1 match
const int Arsize=10000;
- 정모/2011.4.4/CodeRace . . . . 1 match
int main(int argc, const char **argv) {
- 정수민 . . . . 1 match
const int max_position = 6;
- 최소정수의합/조현태 . . . . 1 match
const int COMPARENUM=3000;
- 큐/Leonardong . . . . 1 match
const int Asize = 3;
- 큰수찾아저장하기/문보창 . . . . 1 match
const int SIZE = 4;
- 토이/삼각형만들기/김남훈 . . . . 1 match
다만 걱정되는게 있었다면, visual studio 띄우기도 귀찮아서.. 그리고 요즘에는 이런거 짜는데 마소 비주얼 스튜디오 형님까지 끌어들이는건 좀 미안하게 느껴져서 그냥 zp server 에서 vi 로 두들겼는데.. 나 gdb 쓸 줄 모르니까. malloc 쓰면서 약간 두려웠지. 흐흐흐. 다행이 const int 를 case 에서 받을 수 없는거 (이런 줄 오늘 알았다) 말고는 별달리 에러 없이 한방에 되주셔서 즐거웠지.
- 파스칼삼각형/aekae . . . . 1 match
const int MAX = 100;
- 파스칼삼각형/임다찬 . . . . 1 match
const int MAX = 100;
- 피보나치/방선희 . . . . 1 match
const int Max = 5000;
Found 361 matching pages out of 7555 total pages (5000 pages are searched)
You can also click here to search title.