본문 바로가기

분류 전체보기

(27)
제이쿼리란? Document /* 선택자란? 선택자는 html요소를 선택하여 가져옵니다. $(function(){ $("요소 선택").css("속성","값"); }); */ $(function(){ $(".wrap_1").css("textalign","center"); $(".wrap_1 p").css("color","yello"); // 직접선택자 $(".active").next.css("color","red"); // 근접선택자 $(".wrap_1").eq(2).css("background-color","blue"); /* 위치선택자 p태그 배열이 생김 배열[0]=텍스트1 배열[1]=내용 배열[2]=네이버 배열[3]=입력창 결론, 위의 코드는 배열[2]를 가르킴.*/ $("input[type=text]").css..
LI태그 점 없애기 예> 점 없애기 안녕하세요 하이하이 결과> 안녕하세요. 하이하이 예> 불릿 없애기 + 들여쓰기 없애기 안녕하세요 하이하이 결과> 안녕하세요. 하이하이 출처: https://biju.tistory.com/256 [에헤라디야~]
html 회원가입 유효성 검사 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 12..
c++ public protected private public #include using namespace std; /* 상속 ==> 코드의 재활용 유지보수 부모클래스: 자식의 공통된 사황을 가지고 있다 자식클래스: 자신만의 고유한 기능을 추가만 하면된다. 1.상속방식 1> private 상속 : has ~ a; 부모의 멤버가 모두 자식으로 상속했을 때 : private로 변한다. (내부적으로 변한다.) 2> protected 상속: has ~ a; 부모의 public 멤버가 protected로 변환하여 상속된다. 3> public 상속 : is ~a; 있는 그대로 상속이 된다. */ class A { private: int a1 =1; protected: int b1 =2; public: int c1 =3 ; int getA1() { return a1..
reference 레퍼런스 계산기 구현 #include using namespace std; int input(int *a, int *b, char *op) { float opp=0; cout *a >> *b; cout op; switch (*op) { case '+': opp = *a + *b; break; case '-': opp = *a - *b; break; case '*': opp = *a * *b; break; case '/': opp =(float) *a / *b; break; } return opp; } void print(int opp) { cout
c++ 헤더파일로 빼고 구현한 계산기 main 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include using namespace std; #include "oper.h" int main() { cal *c = new cal; c->input(); switch (c->getop()) { case '+': c->setsum(); break; case '-': c->setsuu(); break; case '*': c->setmul(); break; case '/': c->setdiv(); break; } c->print(); delete c; } Colored by Color Scripter cs oper 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1..
c++ operator 연산자 구현 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 #include using namespace std; class A{ int a; public: A(int a = 0) { this-> a = a; } void setA(int a) { this->a = a; } int getA() { return a; } friend ostream & operator (ostream &in, A &aa); friend istream & operator >> (istream & in, A &aa); }; ostream & operator aa...
c++ 동적바인딩 계산기 ver2 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 #includeusing namespace std; class cal { private: int *a; int *b; char *op; int *opp = 0; public: cal() { a = new int; b = new int; op = new char; opp = new int; } int input() { cout *a >> *b; cout op; switch (*op) { case '+': *opp = *a + *b;..