Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
SinggahDapur SinggahDapur is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 348
Rep Power: 15
SinggahDapur mempunyai hidup yang Normal
Default [ASK] tolongin ane Gan. (C language)

#include

#include



typedef struct Grid {

int counter;

char *arr;

}Grid;



struct Grid* adt() {

struct Grid *X = (struct Grid*)malloc(sizeof(Grid));

X->arr = "Hello World\n";

X->counter = 1;

return (Grid*) X;

}



int main(void)

{

struct Grid *X;

X = (Grid *) adt();

printf("%s %d\n",X->arr,X->counter);

free(X);

return 0;

}



Gan, pertanyaan ane, dari program di atas. kenapa setelah perlu bintang di depan "char *arr" yang di typedef struct Grid?



Terimakasih Gan.

</div>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Terkait
Thread Thread Starter Forum Replies Last Post
JUAL Tolongin gan..cari buku2 ini...tolongin yaa einsteinn Buku 0 18th July 2012 01:47 PM
[HELP]Tolongin ane gan pingpong Lounge 0 27th May 2012 05:50 PM
Tolongin ane gan bakriegroup Lounge 0 27th May 2012 02:59 PM
Tolongin ane gan jenglotman Misteri, Horror, Supranatural 0 24th April 2012 09:36 AM

 


All times are GMT +7. The time now is 02:43 AM.