Advertisement
Archon

Segfault

Feb 27th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.14 KB | None | 0 0
  1. #include <string>
  2. #include <cstdlib>
  3.  
  4. int main(){
  5.     std::string *p = (std::string *)malloc(sizeof(std::string));
  6.     *p = "asdf";
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement