fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. class Message {
  7.  
  8. public:
  9. Message ();
  10. Message (string, string, time_t);
  11. void changeSubject (string);
  12. void addMessage (string);
  13. void append();
  14. string getSender ();
  15. string getRecipient ();
  16. string getSubject ();
  17. string getMessage ();
  18. char* geTime ();
  19. void printEverything ();
  20.  
  21. private:
  22. string sender;
  23. string recipient;
  24. char* tstamp;
  25. string subject;
  26. vector <string> message;
  27. };
  28.  
  29. void Message::addMessage (string messageo) {
  30. message.push_back(messageo);
  31. }
  32.  
  33. void Message::append () {
  34. int n = message.size();
  35. for (int x = 0; x < n; x++) {
  36. cout << message[x];
  37. }
  38. return;
  39. }
  40.  
  41. int main()
  42. {
  43. Message person;
  44. string whatyouwant;
  45. cin >> whatyouwant;
  46. while (whatyouwant != "."){
  47. person.addMessage(whatyouwant);
  48. cin >> whatyouwant;
  49. }
  50.  
  51. person.append();
  52.  
  53. return 0;
  54. }
  55.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
up down left right a b a b .
compilation info
/home/QdnTJc/ccs0AmzD.o: In function `main':
prog.cpp:(.text.startup+0x1c): undefined reference to `Message::Message()'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty