Advertisement
giochola

Untitled

Dec 26th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. timus: 106485TP
  2.  
  3.  
  4. s=toupper(c); // Convert lowercase letter to uppercase (function)
  5. s=tolower(c); // Convert uppercase letter to lowercase (function)
  6.  
  7. str.length(); // Return length of string (public member function)
  8. str.size();   // Return length of string (public member function)
  9.  
  10.  
  11. #include <iostream>
  12. ...
  13. // numbers
  14. int n;
  15. while (std::cin >> n)
  16. {
  17.    ...
  18. }
  19. // lines
  20. std::string line;
  21. while (std::getline(std::cin, line))
  22. {
  23.    ...
  24. }
  25. // characters
  26. char c;
  27. while (std::cin.get(c))
  28. {
  29.    ...
  30. }
  31.  
  32.  
  33. fin>>str;
  34.                 ind1 = static_cast<int>(str[0]-97);
  35.                 ind2 = static_cast<int>(str[1]-49);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement