사소한 이야기

  • 홈
  • 태그
  • 방명록

cpp 3

#OOP&rand() 함수의 작동

C++ 표준 라이브러리에 속해 있는 가장 쉽게 사용할 수 있는 랜덤 함수는 기본적으로 rand() 와 srand()으로 구성되어 있다. #include #include using namespace std; int main(){ srand(1); for(int i=0; i

카테고리 없음 2024.03.24

코딩연습 #2 오퍼레이터 추가 연습

#include using namespace std; class Complex { public: Complex(float r=0.0, float i=0.0): re(r), im(i) {} Complex operator +(Complex &c2) { return Complex(re + c2.re, im + c2.im);} Complex operator -() { Complex tmp; tmp.re = -re; tmp.im = -im; return tmp; } void Print() { cout

카테고리 없음 2023.05.08

코딩 연습 #1 클래스, 함수 오버로딩 230502

#include using namespace std; class Complex { public: Complex(float r=0.0, float i=0.0) :re(r), im(i) {} Complex operator+(const Complex &coma, const Complex &comb) { return Complex(coma.re+comb.re , coma.im+comb.im); } // Complex operator-(const Complex &coma, const Complex &comb) void Print() { cout

카테고리 없음 2023.05.02
이전
1
다음
더보기
프로필사진

사소한 이야기

코딩, 여행 등의 이야기를 담는 공간입니다

  • 분류 전체보기 (15)

Tag

COSPROPYTHON2급, 아사쿠사, 오버로딩, 라멘, COSPROPYTHON2급기출문제, 라멘야시마, 코스프로, 도쿄, COSPROPYTHON2급모의고사, 새우카츠샌드, 마루고 돈까스, 캡슐호텔, cpp, 코시탄탄, 우나톤톤, 복소수 연산, Operator, 컴공생, COSPROPYTHON2급합격, 신주쿠,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바