Horje
back() in c++ Code Example
back() in c++
// my linkedin : https://www.linkedin.com/in/vaalarivan-prasanna-3a07bb203/
vector<int> vec = {1, 2, 5, 6};
int ele = vec.back();  //ele = 6
//back() method does delete the last element from the vector, it just returns\n
//the last element.
c++ back()
// string::back
#include <iostream>
#include <string>

int main ()
{
  std::string str ("hello world.");
  str.back() = '!';
  std::cout << str << '\n';
  return 0;
}




Cpp

Related
get window position Code Example get window position Code Example
less than operator overloading in c++ Code Example less than operator overloading in c++ Code Example
Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to t Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to t
conditional operator in cpp Code Example conditional operator in cpp Code Example
move mouse c++ Code Example move mouse c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8