C++디버깅 질문입니다.
멈짓체
#include iostreamusing namespace std;struct point { float x; float y;}bool userinputpoint(point &a);float area(point a, point b, point c);float angle(point a, point b, point c);float distance(point a, point b);intmain(int argc, char *argv[]){ point ocornera, ocornerb, ocornerc; cout enter the first vertex of the triangle $ ; userinputpoint(ocornera); cout enter the second vertex of the triangle $ ; userinputpoint(ocornerb); cout enter the third vertex of the triangle $ ; userinputpoint(ocornera); cout side ab is distance(ocornera, ocornerb) long.\n; cout side ac is distance(ocornera, ocornerc) long.\n; cout side bc is distance(ocornerb, ocornerc) long.\n; cout the internal angle at vertex a is angle(ocornerb, ocornera, ocornerc) degrees.\n; cout the internal angle at vertex b is angle(ocornera, ocornerb, ocornerc) degrees.\n; cout the internal angle at vertex c is angle(ocornera, ocornerc, ocornerb) degrees.\n; cout the area of the triangle abc is area(ocornera, ocornerb, ocornerc) units squared.\n; return 0;}booluserinputpoint(point &a){ bool bretval = true; cout enter the x co-ordinate $; cin a.x; bretval = cin.good(); cout ener the y co-ordinate $; cin a.y; bretval = cin.good(); return bretval;}floatarea(point a, point b, point c)// calculate the of triangle abc//// a// / \// / \// b---------------c//{ // cross product of vector ab & bc float ba_x = a.x - b.x; float ba_y = a.y - b.y; float bc_x = c.x - b.x; float bc_y = c.y - b.y; return (ba_x * bc_y - ba_y * bc_x)/2;}floatangle(point a, point b, point c)// calculate the angle at b made by the sides ab bc.//// a// / \// / \// b---------------c//{ float abx, cbx; abx = atan( (b.y-a.y) / (b.x-a.y) ); cbx = atan( (b.y-c.y) / (b.x-c.y) ); return (abx - cbx);}floatdistance(point a, point b){ return sqrt( (b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y);}
여기서 syntax 오류랑 문법적 오류랑 다 같이 일어 납니다...
정말...죄송하지만요...전 이제..c++을 공부한지..2주일쨰 되는 사람입니다. 주인장님께서 경고 하셨듯이..
악플이 많이 달릴수도 있는데요..이제 저는 오버로딩이라든지..인라인함수등등을 겨우 아는 처지구요..
아직 클래스이런게 뭔지도 모릅니다. 근데 이게 내일까지 내야 할 과제 입니다.
삼각형 각변의 길이 각도 면적을 구하는건데요..atan이 정의가 안되있다고 오류가 뜨고...막..;;
게다가 저는 호주서 유학중인데..이번이 첫학기랑 영어도 안되고...겨우 한국서 c++열혈강의 수업을 다운받아서..
매일매일..공부하고 있씁니다.근데 지금의 제 실력으로는..수업을 따라가기도 힘들고..이정도의 기본 과제도 해내기
힘드네요. 그래서 여기 사이트도 열심히 들어와서 공부하고 개인적으로도 많이 열심히 할겁니다. 그러니깐..
너무 제가 성의없다 생각하지 마시고 좀 알려주세요..
참고로 저희 학교는 putty라는 프로그램을 사용합니다. linux c++을 하구 있구요..g++을 컴파일러로 사용하고 있습니다.
전 c언어도 공부 안해봐서...정말..어렵긴 어렵지만...차근차근 열심히 해볼 생각으로 있습니다.
제발 좀 알려주세요..부탁드립니다...
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2700304 | ie8 전용핵 문의 (3) | 여자 | 2025-07-03 |
2700281 | 이런경우 어떻게 코딩해야 표준에 따르는건가요? (6) | 늘솜 | 2025-07-03 |
2700230 | 질문이여 ! | 뿡뿡몬 | 2025-07-03 |
2700205 | 액션스크립트책 좀 추천해주세요. (10) | 화이트캣 | 2025-07-02 |
2700173 | 자바 소스인데 어떤게 에러인지..? (1) | 호빵녀 | 2025-07-02 |
2700142 | 하단이 붙어있는 가변 레이아웃구조 질문드립니다. | 이플 | 2025-07-02 |
2700089 | 이미지를 사다리꼴로 비틀게 하는 액션코드가 있나요? (4) | 여름 | 2025-07-01 |
2700033 | 배경에 그라데이션을 넣으려고 하는데요.. (4) | 화이티 | 2025-07-01 |
2700005 | [질문] TextField 객체의 실제 높이 알아오는 방법 ? | 천사의눈물 | 2025-07-01 |
2699978 | FileReferenceList를 이용하여 업로드시 자꾸 실행속도가 느리다는 팝업이... (10) | 데이비드 | 2025-06-30 |
2699944 | 자바스크립트가 많은 사이트는... (6) | 희나리 | 2025-06-30 |
2699918 | 브라우저마다 다른 input과 텍스트 정렬 (3) | 늘봄 | 2025-06-30 |
2699887 | 동적텍스트를 그래픽으로?? (2) | 족장 | 2025-06-30 |
2699862 | scope넣기 (1) | 아인 | 2025-06-29 |
2699835 | exe로 만드는 방법을....알려주세요.. (5) | 방방 | 2025-06-29 |
2699809 | 롤오버할때 백그라운드 이미지로할때 alt설명은 어떻게해야하죠?..ㅠ (4) | 반혈 | 2025-06-29 |
2699757 | 리스트뷰에 있는 내용을 랜덤으로 추출 | 세실 | 2025-06-28 |
2699725 | JMX 질문입니다. (1) | 시나브로 | 2025-06-28 |
2699695 | 으으아으ㅏ으ㅏ 정말미쳐버리겟네요 | 진달래 | 2025-06-28 |
2699665 | absolute에 대해서 궁금한게 있습니다 (1) | 영빈이 | 2025-06-28 |