일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 자바독학
- 개발자
- 이웃한 칸
- Python
- 코딩
- Project
- 자바정리
- java정리
- Reflex
- 코테
- 백준
- java
- 빅데이터
- 모의 주식
- 코딩독학
- 프로그램
- 자바
- 개인프로젝트
- 개발
- SNS
- 사물인터넷
- 프로그래머스
- 풀스택프레임워크
- 코스닥
- 주가예측
- C++
- backend
- 프로그래밍
- 코딩테스트
- frontend
- Today
- Total
목록C++ Programming (41)
Creative Code
※main.cpp파일 #include #include "complex.h" using iot::Complex; int main() { iot::Complex c1(3.0,4.0); Complex c2(3.0); Complex c3; const Complex c4 = c1; c2 = c1; c2.real(c1.real()); c2.imag(c1.imag()); std::cout
※main.cpp파일 #include #include "shape.h" #include "rectangle.h" #include "circle.h" #include void printArea(Shape *ps) { std::cout
※main.cpp파일 #include #include "string.h" int main() { String s1; String s2 = "hello, world"; // String s2("hello,world"); //String s2 = 0;// NULL String s3 = s2; // String s3(s2); s1 = s2; String s4 = " IoT"; s1 = s2 + s4; s1 = "hello, "; //String tmp("hello, "); if (s1 == s2) std::cout
#include int main(void) { int a = 0x12345678; char *p; //p = (char*) &a; p = reinterpret_cast(&a); //강제 형 변환 static_cast가 안될 때 printf("*p : 0x%x\n",*p); return 0; }
#include int main(void) { int men, women; printf("남자 수 : "); scanf("%d",&men); printf("여자 수 : "); scanf("%d",&women); int total = men + women; //double ratiom = 1.0 * men/total * 100; //double ratiow =1.0 * women/total * 100; double ratiom = static_cast(men)/(double)(total) * (double) 100; //static_cast double ratiow = static_cast(women)/(total) * 100; printf("남자 비율 : %.2f%%\n",ratiom); printf("..