Guest User

Untitled

a guest
Jan 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. char BUFF[500];
  6.  
  7. // Gets the ACTUAL length of an individual character array.
  8. int getLength(char* chrarray) {
  9. int counter = 0;
  10. while (chrarray[counter] != '\0') {
  11. counter++;
  12. }
  13. counter += 1;
  14. return counter;
  15. }
  16.  
  17. void getArray() {
  18. int state = 1;
  19. char LINE[30];
  20. char* arrow = BUFF;
  21. do {
  22. arrow += getLength(LINE);
  23.  
  24. cin.getline(BUFF, 30);
  25.  
  26. //LINE = arrow;
  27. } while (LINE[0] != '0');
  28. }
  29.  
  30. void pause() {
  31. cin.clear(); cin.ignore(80, '\n');
  32. do {
  33. cout << "PRESS ENTER TO CONTINE" << endl;
  34. } while (cin.get() != '\n');
  35. }
  36.  
  37. int main() {
  38. getArray();
  39.  
  40. //system("pause");
  41. return 0;
  42. }
Add Comment
Please, Sign In to add comment