compilation error

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2007
Posts: 1
Reputation: RobertNashon is an unknown quantity at this point 
Solved Threads: 0
RobertNashon RobertNashon is offline Offline
Newbie Poster

compilation error

 
0
  #1
Mar 3rd, 2007
Hi I'am having a problem in debugging this code of mine .There is a problem in the execution of cl.e file.
This is the code;
  1. #include<iostream.h>
  2. #include<string.h>
  3. #include<conio.h>
  4. #include<stdio.h>
  5. #include<stdlib.h>
  6. #include<math.h>
  7.  
  8. class hospital {
  9. char password;
  10. int telno,mobno,fax;
  11. char name[20],log,address[20], website[20],email[20];
  12. public:
  13.  
  14. hospital;
  15. int loging();
  16. void menu();
  17. class reception {//this class takes information of patients admitted
  18. char p_name[20];
  19. int age;
  20. char gender;
  21. int wardno;
  22. int bedno;
  23. int day,month,year;
  24. public:
  25.  
  26. reception();
  27. void patient_info();
  28. void display_info();
  29. ~reception();
  30.  
  31. };//end of class reception
  32. class clinic { //this is the function clinic for the outpatients
  33. char p_name[20],examination[50],prescription[100];
  34. int day, month, year;
  35. public:
  36.  
  37. void get_info();
  38. void display_info();
  39.  
  40. class dental {
  41. char p_name[20],examination[50],prescription[100],treatment[100];
  42. int day, month, year;
  43. public:
  44.  
  45. void get_info();
  46. void display_info();
  47.  
  48. };//end of class dental clinic
  49. class eye_clinic {
  50. char p_name[20],examination[50],prescription[100],treatment[100];
  51. int day, month, year;
  52. public:
  53.  
  54. void get_info();
  55. void display_info();
  56.  
  57. };//end of class eye clinic
  58. class dematological {
  59. char p_name[20],examination[50],prescription[100],treatment[100];
  60. int date, month, year;
  61. public:
  62.  
  63. void get_info();
  64. void display_info();
  65.  
  66. }; //end of class dematological clinic
  67. };//end of class clinic
  68. class pharmacy {
  69. char p_name[20],doctor[20];
  70. char d_name[20],prescriptions[50];
  71. int price;
  72. public:
  73.  
  74. void get_info();
  75. void display_info();
  76.  
  77. };//end of class pharmacy
  78. class laboratory {
  79. char p_name[20];
  80. char test[50];
  81. char results[50];
  82. int labfee;
  83. int fee;
  84. public:
  85.  
  86. void labbill();
  87. void get_info();
  88. void display_info();
  89.  
  90. };//end of class lab
  91. class ward {
  92. char p_name[20];
  93. int age;
  94. public:
  95.  
  96. void get_ward();
  97.  
  98. void display_ward();
  99.  
  100.  
  101. class paediatric {
  102. char p_name[20],examination[50],select;
  103. int bedno,wardno,day,month,year,standingward_fee,no_days;
  104. public:
  105.  
  106. void get_info();
  107. int wardbill(int);
  108. void display_info();
  109.  
  110. };//end of paediatric ward
  111. class adult {
  112. char sex,p_name[20],examination[50],select,ward[16];
  113. int wardno,bedno,day,month,year,standingward_fee,no_days;
  114. public:
  115.  
  116.  
  117. void get_info();
  118. int wardbill(int);
  119. void display_info();
  120.  
  121. };//end of adult ward
  122. class maternity {
  123. char p_name[20],birth_status[20],doctor[20];
  124. int day,month,year,no_hours;
  125. char baby_sex[6];
  126. public:
  127.  
  128. void get_info();
  129. int wardfee();
  130. void display_info();
  131. };//end of class maternity
  132. };//end of class ward
  133. class icu {
  134. char p_name[20],examination[50];
  135. int day,month,year,time,no_days,medicalfee;
  136. const int standingward_charge;
  137. public:
  138. void get_info();
  139. int icu_fee();
  140. void display_info();
  141.  
  142. };//end of the class icu
  143. class finance_billing {
  144. int amount,price,fee,t_bill;
  145.  
  146. public:
  147.  
  148. int bill(int);
  149. void display_info();
  150.  
  151. };
  152. //end of class finance_billing
  153. hospital::hospital
  154. {
  155. cout<<"TUUNGANE HOSPITAL"<<endl;
  156. cout<<"55502-00200 NAIROBI"<<endl;
  157. cout<<"<A href="http://www.tuungane.org"<<endl">www.tuungane.org"<<endl;
  158. cout<<"<A href="mailto:tuunagane@yahoo.com"<<endl">tuunagane@yahoo.com"<<endl;
  159. cout<<"TELEPHONE NO. 861869"<<endl;
  160. cout<<"MOBILEPHONE NO. 0721543764"<<endl;
  161. }
  162. int hospital::loging()
  163. {
  164. cout<<"Please enter the password";
  165. cin>>password;
  166. if (password==password){
  167. cout<<"welcome to Tuungane Hospital System!";}
  168. else{
  169. cout<<"Wrong password!\n"<<"Sorry you are not an authorised user please enter N to exit";
  170. switch(log)
  171. {
  172. case 'N':case 'n':return 0;;
  173. }}
  174. }
  175. hospital::reception::reception()
  176. {
  177. p_name=="name";
  178. wardno=001;
  179. bedno=0001;
  180. }
  181. hospital::reception::~reception()
  182. {
  183. cout<<"Destructor called";
  184. }
  185.  
  186. void hospital::reception::patient_info()
  187. {
  188. cout<<"Please enter the patients details"<<endl;
  189. cout<<"Name :";
  190. cin.getline(p_name,20)<<endl;
  191. cout<<"Age :";
  192. cin>>age;
  193. cout<<endl;
  194. cout<<"Ward number :";
  195. cin>>wardno;
  196. cout<<endl;
  197. cout<<"Bed number :";
  198. cin>>bedno;
  199. cout<<endl;
  200. cout<<"Enter the date of admission :";
  201. cout<<"day/";
  202. cin>>day;
  203. cout<<"month/";
  204. cin>>month;
  205. cout<<"year";
  206. cin>>year;
  207. cout<<endl;
  208. }
  209. void hospital::reception::display_info()
  210. {
  211. cout<<"Patient's details :"<<endl;
  212. cout<<"Name"<<p_name;
  213. cout<<"Age"<<age;
  214. cout<<"Ward"<<wardno;
  215. cout<<"Bed"<<bedno;
  216. cout<<day<<"/"<<month<<"/"<<year;
  217. }
  218. void hospital::clinic::get_info()
  219. {
  220. cout<<"patient's name";
  221. cin.getline(p_name,20);
  222. cout<<"examination"<<endl;
  223. cin.getline(examination,50);
  224. cout<<"Doctor's prescription :"<<endl;
  225. cin.getline(prescription,50);
  226. cout<<endl;
  227. cout<<"Treatment given: "<<endl;
  228. cin.getline(treatment,100);
  229. cout<<"Date of treatment is :";
  230. cout<<"day/";
  231. cin>>day;
  232. cout<<"month/";
  233. cin>>month;
  234. cout<<"year/";
  235. cin>>year;
  236. }
  237. void hospital::clinic::display_info()
  238. {
  239. cout<<"Patient's name: "<<p_name<<endl;
  240. cout<<"Examination:"<<examination<<endl;
  241. cout<<"Prescription :"<<prescription<<endl;
  242. cout<<"Treatment offered:"<<treatment<<endl;
  243. cout<<"Date:"<<day<<"/"<<month<<"/"<<year<<endl;
  244.  
  245. void hospital::clinic::dental::get_info()
  246. {
  247. cout<<"patient's name";
  248. cin.getline(p_name,20);
  249. cout<<"examination"<<endl;
  250. cin.getline(examination,50);
  251. cout<<"Doctor's prescription :"<<endl;
  252. cin.getline(prescription,50);
  253. cout<<endl;
  254. cout<<"Treatment given: "<<endl;
  255. cin.getline(treatment,50);
  256. cout<<"Date of treatment is :";
  257. cout<<"day/";
  258. cin>>day;
  259. cout<<"month/";
  260. cin>>month;
  261. cout<<"year/";
  262. cin>>year;
  263. }
  264. void hospital::clinic::dental::display_info()
  265. {
  266. cout<<"Patient's name: "<<p_name<<endl;
  267. cout<<"Examination:"<<examination<<endl;
  268. cout<<"Prescription :"prescription<<endl;
  269. cout<<"Treatment offered:"<<treatment<<endl;
  270. cout<<"Date:"<<day<<"/"<<month<<"/"<<year<<endl;
  271. }
  272. void hospital::clinic::eye_clinic::get_info()
  273. {
  274. cout<<"patient's name";
  275. cin.getline(p_name,20);
  276. cout<<"examination"<<endl;
  277. cin.getline(examination,50);
  278. cout<<"Doctor's prescription :"<<endl;
  279. cin.getline(prescription,50);
  280. cout<<endl;
  281. cout<<"Treatment given: "<<endl;
  282. cin.getline(treatment,50);
  283. cout<<"Date of treatment is :";
  284. cout<<"day/";
  285. cin>>day;
  286. cout<<"month/";
  287. cin>>month;
  288. cout<<"year/";
  289. cin>>year;
  290. }
  291. void hospital::clinic::eye_clinic::display_info()
  292. {
  293. cout<<"Patient's name: "<<p_name<<endl;
  294. cout<<"Examination:"<<examination<<endl;
  295. cout<<"Prescription :"prescription<<endl;
  296. cout<<"Treatment offered:"<<treatment<<endl;
  297. cout<<"Date:"<<day<<"/"<<month<<"/"<<year<<endl;
  298. }
  299. void hospital::clinic::dematological::get_info()
  300. {
  301. cout<<"patient's name";
  302. cin.getline(p_name,20);
  303. cout<<"examination"<<endl;
  304. cin.getline(examination,50);
  305. cout<<"Doctor's prescription :"<<endl;
  306. cin.getline(prescription,50);
  307. cout<<endl;
  308. cout<<"Treatment given: "<<endl;
  309. cin.getline(treatment,50);
  310. cout<<"Date of treatment is :";
  311. cout<<"day/";
  312. cin>>day;
  313. cout<<"month/";
  314. cin>>month;
  315. cout<<"year/";
  316. cin>>year;
  317. }
  318. void hospital::clinic::dematological::display_info()
  319. {
  320. cout<<"Patient's name: "<<p_name<<endl;
  321. cout<<"Examination:"<<examination<<endl;
  322. cout<<"Prescription :"prescription<<endl;
  323. cout<<"Treatment offered:"<<treatment<<endl;
  324. cout<<"Date:"<<day<<"/"<<month<<"/"<<year<<endl;
  325. }
  326. void hospital::pharmacy::get_info()
  327. {
  328.  
  329. cout<<"Enter the name of the patient: ";
  330. cin>>p_name;
  331. cout<<"Enter the name of the doctor who prescribed the drug :";
  332. cin>>doctor;
  333. cout<<"Enter the name of the drug prescribed :";
  334. cin>>d_name;
  335. cout<<"Enter the price ofthe drug:";
  336. cin>>price;
  337. }
  338. void hospital::pharmacy::display_info()
  339. {
  340. cout<<"Patient's name: "<<p_name;
  341. cout<<"Doctor's name: "<<doctor;
  342. cout<<"Drug prescribed: "<<d_name;
  343. cout<<"Drug price: "<<price;
  344. }
  345. void hospital::laboratory::get_info()
  346. {
  347. cout<<"Enter the name of the patient: ";
  348. cin>>p_name;
  349. cout<<"Enter the type of test conducted: ";
  350. cin.getline(test,50);
  351. cout<<"Results of the test done are:";
  352. cin.getline(result,50);
  353. }
  354. int hospital::laboratory::labbill()
  355. {
  356. for(const int standing_test_fee = 1000);
  357. labfee=standing_test_fee + fee;
  358. cout<<"Enter the fee for the test done:";
  359. cin>>fee;
  360. labfee=standing_test_fee + fee;
  361. cout<<"The total lab fee for the test done :"<<labfee;
  362. }
  363. void hospital::laboratory::display_info()
  364. {
  365. cout<<"Patient's name: "<<p_name<<endl;
  366. cout<<"Type of test done is :"<<test<<endl;
  367. cout<<"Results of the test done: "<<results<<endl;
  368. cout<<"The fee for the test done is: "<<labfee<<endl;
  369. }
  370. void hospital::ward::get_ward()
  371. {
  372. cout<<"Enter the name of the patient: ";
  373. cin.getline(p_name,20);
  374. if (int age <=18)
  375. {
  376. cout<<"Admit the patient to the paediatric ward:";
  377. }
  378. else
  379. {
  380. cout<<"Admit to the adults ward";
  381. cout<<"Enter the age of the patient: ";
  382. cin>>age;
  383. }
  384. }
  385. void hospital::ward::display_info()
  386. {
  387. cout<<"Patient's name: "<<p_name;
  388. cout<<"Age: "<<age;
  389. if(age<=18)
  390. {
  391. cout<<"This patient is admitted in the paediatric ward: ";
  392. }
  393. else
  394. {
  395. cout<<"This patient is admitted in the Adults ward: ";
  396. }
  397. }
  398. void hospital::ward::paediatric::get_info()
  399. {
  400. cout<<"Enter the patient's name: ";
  401. cin.getline(p_name,20);
  402. cout<<"Enter the ward number: ";
  403. cin>>wardno;
  404. cout<<"Enter the bed number: ";
  405. cin>>bedno;
  406. cout<<"Enter the date of admission:";
  407. cout<<"day";
  408. cin>>day;
  409. cout<<"month";
  410. cin>>month;
  411. cout<<"year";
  412. cin>>year;
  413. }
  414. int hospital::ward::paediatric::wardbill()
  415. {
  416. cout<<"Is the patient in a private ward?(N/Y)";
  417. cin>>select;
  418. if(select==N);
  419. standingward_fee=2000;
  420. else
  421. standingward_fee=1000;
  422.  
  423. const int bedfee=300;
  424. const int mealfee=250;
  425. int no_days;
  426. cout<<"Enter the number of days: ";
  427. cin>>no_days;
  428. wardbill= ((bedfee+mealfee)*no_days)+standingward_fee;
  429. void hospital::ward::paediatric::display_info()
  430. {
  431. cout<<"Patient's name: "<<p_name;
  432. cout<<"Ward number: "<<wardno;
  433. cout<<"Bed number: "<<bedno;
  434. cout<<"Date of admission: "<<day<<"/"<<month<<"/"<<year;
  435. cout<<"Ward fee: "<<wardbill;
  436. }
  437. void hospital::ward::adult::get_info()
  438. {
  439. cout<<"Enter the patient's name: ";
  440. cin.getline(p_name,20);
  441. cout<<"Enter the patient's sex:(M/F)";
  442. cin>>sex;
  443. cout<<"Ward: ";
  444. if(sex==M);
  445. ward=="Male ward";
  446. else
  447. ward=="Female ward";
  448. cout<<ward;
  449. cout<<"Enter the ward number: ";
  450. cin>>wardno;
  451. cout<<"Enter the bed number: ";
  452. cin>>bedno;
  453. cout<<"Enter the date of admission:";
  454. cout<<"day";
  455. cin>>day;
  456. cout<<"month";
  457. cin>>month;
  458. cout<<"year";
  459. }
  460. int hospital::ward::adult::wardbill()
  461. {
  462. ut<<"Is the patient in a private ward?(N/Y)";
  463. cin>>select;
  464. if(select==N);
  465. standingward_fee=2000;
  466. else
  467. standingward_fee=1000;
  468. cout<<"Enter the number of days: ";
  469. cin>>no_days
  470. const int bedfee=300;
  471. const int mealfee=250;
  472.  
  473. wardbill= ((bedfee+mealfee)*no_days)+standingward_fee;
  474. }
  475. void hospital::ward::adult::display_info()
  476. {
  477. cout<<"Patient's name: "<<p_name;
  478. cout<<"Sex: "<<sex;
  479. cout<<"Ward: "<<ward;
  480. cout<<"Ward number: "<<wardno;
  481. cout<<"Bed number: "<<bedno;
  482. cout<<"Date of admission: "<<day<<"/"<<month<<"/"<<year;
  483. cout<<"Ward fee: "<<wardbill;
  484. }
  485. void hospital::maternity::get_info()
  486. {
  487. cout<<"Enter the name of the patient: ";
  488. cin.getline(p_name,20);
  489. cout<<"Enter the name of the doctor who performed the delivery:";
  490. cin.getline(doctor,20);
  491. cout<<"Enter the status of the birth process: ";
  492. cin.getline(birth_status,20);
  493. cout<<"Enter the sex of the baby: ";
  494. cin>>baby_sex;
  495. cout<<"Enter the date of birth";
  496. cout<<"day";
  497. cin>>day;
  498. cout<<"month";
  499. cin>>month;
  500. cout<<"year";
  501. }
  502. int hospital::maternity::wardfee()
  503. {
  504. cout<<"Is the patient in a private ward?(N/Y)";
  505. cin>>select;
  506. if(select==N);
  507. standingward_fee=2000;
  508. else
  509. standingward_fee=1000;
  510. const int bedfee=300;
  511. const int mealfee=250;
  512. int no_days;
  513. cout<<"Enter the number of days: ";
  514. cin>>no_days
  515. wardbill= ((bedfee+mealfee)*no_days)+standingward_fee;
  516. }
  517. void hospital::maternity::display_info()
  518. {
  519. cout<<"Patient's name: "<<p_name<<endl;
  520. cout<<"Doctor's name: "<<doctor;,,endl;
  521. cout<<"Birth status: "<<birth_status<<endl;
  522. cout<<"Sex of the baby: "<<baby_sex<<endl;
  523. cout<<"Date of delivery: "<<day<<"/"<<month<<"/"<<year<<endl;
  524. cout<<"Maternity ward fee: "<<wardbill;
  525. }
  526. void hospital::icu::get_info()
  527. {
  528. cout<<"Enter the name of the patient: ";
  529. cin.getline(p_name,20);
  530. cout<<"Enter the emergency reason: ";
  531. cin>>examination;
  532. cout<<"Enter ther date of admission: ";
  533. cout<<"day";
  534. cin>>day;
  535. cout<<"month";
  536. cin>>month;
  537. cout<<"year";
  538. }
  539. int hospital::icu::icu_fee()
  540. {
  541. standingward_charge=5000;
  542. cout<<"Enter the medicalfee:";
  543. cin>>medicalfee;
  544. cout<<"Enter the number of hours spent in the icu:";
  545. cin>>no_hours;
  546. icubill=(standingward_charge * no_hours)+medicalfee;
  547. }
  548. void hospital::icu::display_info()
  549. {
  550. cout<<"Patient's name: "<<p_name<<endl;
  551. cout<<"Emergency state:"<<examination<<endl;
  552. cout<<"Date of admission: "<<day<<"/"<<month<<"/"<<year<<endl;
  553. cout<<"Standingcharge for the ICU: "<<standingward_charge<<endl;
  554. cout<<"Medical fee: "<<medicalfee<<endl;
  555. cout<<"Total ICU bill = "<<icubill;
  556. }
  557. int hospital::finance_billing::bill(int)
  558. {
  559. ccut<<"Enter the total ward bill:";
  560. cin>>wardbill;
  561. cout<<"Enter the total lab fee: ";
  562. cin>>labfee;
  563. cout<<"Enter the total ICU fee: ";
  564. cin>>icufee;
  565. t_bill = wardbill + labfee + icubill;
  566. }
  567. void hospital::finance_billing::display_info()
  568. {
  569. cout<<"Ward fee = "<<wardfee;
  570. cout<<"Laboratory fee = "<<labfee;
  571. cout<<"Intensive care unit fee = "<<icufee;
  572. cout<<"Total bill = "<<t_bill<<<endl;
  573. }
  574. void hospital::menu()
  575. {
  576. cout<<"H¬hospital."<<endl;
  577. cout<<"R¬reception."<<endl;
  578. cout<<"C¬clinic."<<endl;
  579. cout<<"D¬dental."<<endl;
  580. cout<<"E¬eye_clinic."<<endl;
  581. cout<<"S¬dematological."<<endl;
  582. cout<<"P¬pharmacy."<<endl;
  583. cout<<"L¬laboratory."<<endl;
  584. cout<<"W¬ward."<<endl;
  585. cout<<"K¬paediatrics."<<endl;
  586. cout<<"A¬adults."<<endl;
  587. cout<<"M¬maternity."<<endl;
  588. cout<<"I¬ICU."<<endl;
  589. cout<<"F¬finance_billing."<<endl;
  590. }
  591. void main(void)
  592. {
  593. class hospital hosp;
  594. char option;
  595. hosp.menu();
  596. while((option=cin.get())!='q');
  597. }
  598. switch(option)
  599. {
  600. case 'H':
  601. hospital();
  602. break;
  603. case 'R':
  604. reception();
  605. break;
  606. case 'C':
  607. clinic();
  608. break;
  609. case 'D':
  610. dental();
  611. break;
  612. case 'E':
  613. eye_clinic();
  614. break;
  615. case 'S':
  616. dematological();
  617. break;
  618. case 'P':
  619. pharmacy();
  620. break;
  621. case 'L':
  622. laboratory();
  623. break;
  624. case 'W':
  625. ward();
  626. break;
  627. case 'K':
  628. paediatric();
  629. break;
  630. case 'A':
  631. adult();
  632. break;
  633. case 'M':
  634. maternity();
  635. break;
  636. case 'I':
  637. icu();
  638. break;
  639. case 'F':
  640. finance_billing();
  641. break;
  642. }
  643.  
Last edited by Ancient Dragon; Mar 3rd, 2007 at 8:02 am. Reason: add code tags
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: compilation error

 
0
  #2
Mar 3rd, 2007
Read this, then edit your post so we can read it.
http://www.daniweb.com/techtalkforum...cement8-3.html

Actually say what the problems are, this isn't a service where you can just dump your code and expect people to magically figure out what you want.

In future, press "compile" every 10 lines or so to make sure you're not digging a massive hole you can't climb out of.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,397
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: compilation error

 
0
  #3
Mar 3rd, 2007
>>There is a problem in the execution of cl.e file
No, there is nothing wrong with the compiler. Your program is really quite a mess. I tried compiling it with VC++ 2005 Express and got trillions of errors.

Correct the problems one error message at a time. Recompile your program after fixing an error and then fix the next error.

One of the biggest problems I think you will have is correcting unmatched curly braces. You start out by defining class hospital but in the middle you start declaring class reception. Although this isn't illigal its not a good thing to do.

And for goodness sake don't be so skimpy with spaces and blank lines! Put a few blank lines between class declarations to make your program easier to read.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,630
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 718
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: compilation error

 
0
  #4
Mar 3rd, 2007
>Correct the problems one error message at a time.
Starting from the top, by the way. Syntax errors higher up in the code tend to cause many errors later in the code. If you don't start at the top, you'll end up chasing phantom bugs.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: compilation error

 
0
  #5
Mar 3rd, 2007
The lines that are causing the code colourer to mess up are these:
  1. cout<<"<A href="http://www.tuungane.org"<<endl">www.tuungane.org"<<endl;
  2. cout<<"<A href="mailto:tuunagane@yahoo.com"<<endl">tuunagane@yahoo.com"<<endl;
  3.  
To embed a '"' (double quote) character in a string, you need to escape it: \"

Also, strings cannot contain newlines. To insert a newline, use \n.

If you put a newline in the string because it was too long for one line, read this: http://board.theprogrammingsite.com/viewtopic.php?t=85
Last edited by dwks; Mar 3rd, 2007 at 6:10 pm.
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC