fork download
  1. #include <iostream>
  2. #include "cs.hpp"
  3. #include "ss.hpp"
  4. #include "map.hpp"
  5. #include <string>
  6. using namespace std;
  7.  
  8. cs :: cs(){
  9.  
  10. }
  11.  
  12. void cs::csf(){
  13.  
  14. //some introduction text here
  15.  
  16. cin>>c; //c is the classification selected(Wizard, Warrior etc)
  17.  
  18.  
  19.  
  20.  
  21.  
  22. if((c =="Wizard") || (c =="Warrior") || (c =="Rogue") || (c == "Cleric")){
  23.  
  24. }
  25.  
  26. else{//start of else
  27.  
  28. while((c !="Wizard") || (c !="Warrior") || (c !="Rogue") || (c != "Cleric")){//start of while
  29.  
  30. cout<<"Available classes:Wizard,Warrior,Rogue,Cleric"<<endl;
  31. cout<<"Please enter class again"<<endl;
  32. cin>>c;
  33.  
  34. if((c == "Wizard") || (c == "Warrior") || (c == "Rogue") || (c == "Cleric")){//start of if
  35. cout<<"your class is: "<<c<<endl;
  36.  
  37. break;
  38. }//end of if
  39.  
  40.  
  41. }//end of while
  42. }//end of else
  43.  
  44.  
  45. //replacing the classification by numbers
  46.  
  47. if (c=="Wizard"){
  48.  
  49. nc = 1;
  50. }
  51.  
  52. else if(c=="Warrior"){
  53.  
  54. nc = 2;
  55. }
  56.  
  57. else if(c=="Rogue"){
  58.  
  59. nc = 3;
  60. }
  61.  
  62. else if(c=="Cleric")
  63.  
  64. nc = 4;
  65.  
  66. //end of setting numberclassification
  67.  
  68. cout<<"Good..."<<endl;
  69. sleep(1);
  70.  
  71. cout<<"Now you are a "<<c<<endl;
  72. sleep(1);
  73.  
  74. cout<<c<<"'s stats are the following:" <<endl;
  75.  
  76. ss sso;
  77.  
  78. //printing the stats
  79.  
  80. cout<<"health = "<<sso.health<<endl;
  81. cout<<"dexterity = "<<sso.dexterity<<endl;
  82. cout<<"heal = "<<sso.heal<<endl;
  83. cout<<"damage = "<<sso.damage<<endl;
  84. cout<<"mana = "<<sso.mana<<endl;
  85.  
  86.  
  87.  
  88.  
  89. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:10: fatal error: 'cs.hpp' file not found
#include "cs.hpp"
         ^
1 error generated.
stdout
Standard output is empty