What is the equivalent of C strcpy in C++

1 Answer

0 votes
#include <iostream>

int main(void) {
    std::string str = "C++ Programming";

    std::string newstr = str;  // strcpy 
  
    std::cout << str;

    return 0;
}
  
  
  
  
/*
run:
  
C++ Programming
  
*/

 



answered Dec 30, 2021 by avibootz

Related questions

1 answer 157 views
2 answers 1,219 views
1 answer 146 views
1 answer 135 views
135 views asked Aug 27, 2022 by avibootz
1 answer 296 views
1 answer 84 views
...