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 252 views
2 answers 1,510 views
1 answer 231 views
1 answer 203 views
203 views asked Aug 27, 2022 by avibootz
1 answer 391 views
1 answer 162 views
...