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 142 views
2 answers 1,201 views
1 answer 129 views
1 answer 122 views
122 views asked Aug 27, 2022 by avibootz
1 answer 284 views
1 answer 74 views
...