Pastee


SUBMITTED BY: Guest

DATE: Aug. 27, 2013, 7:39 p.m.

FORMAT: Text only

SIZE: 745 Bytes

HITS: 24365

  1. #import <Cocoa/Cocoa.h>
  2. extern "C"{
  3. void display(NSString *text);
  4. }
  5. @interface Display : NSObject
  6. @end
  7. #import "Display.h"
  8. #include <string>
  9. #include <iostream>
  10. using namespace std;
  11. void display(NSString *text){
  12. cout << [text cStringUsingEncoding:NSUTF8StringEncoding] << endl;
  13. }
  14. @implementation Display
  15. @end
  16. display(@"Hola");
  17. extern "C" void display(NSString *text) {
  18. }
  19. extern "C" {
  20. void display(NSString *text) {
  21. }
  22. }
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. void display(NSString *text);
  27. #ifdef __cplusplus
  28. }
  29. #endif

comments powered by Disqus