chozoii

segfault1

Apr 14th, 2011
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. void foo (char s[])
  5. {
  6.     s[0] = 'X';
  7. }
  8.  
  9. int main()
  10. {
  11.     char me[] = "abcdefg";
  12.     foo("efg");
  13.     cout << me;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment