Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
book
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//gcc 5.0.4 #import <Foundation/Foundation.h> @interface Book:NSObject { NSString *title; NSint *selingprice NSint *reprice } -(void)settitle:(NSString *)btitle; -(void)setselingprice:(int)bselingprice; -(void)setreprice:(int)breprice; -(void)getbookdetail; @end @implementation Book -(id) init { self=[super init]; title=@"abc"; selingprice=200; reprice=100; } -(void)settitle:(NSString *)btitle { title=btitle; } -(void)setselingprice:(int)bselingprice { selingprice=bselingprice; } -(void)setreprice:(int)breprice { reprice=breprice; } -(void)getbookdetail { NSLog(@"book \n title=%@ \nselingprice=%d \nreprice=%d",title,selingprice,reprice); } @end int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // NSLog (@"Hello, World!"); Book *b=[[Book alloc] init]; [b getbookdetail]; [pool drain]; return 0; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion