nero 0 Report post Posted November 6, 2007 a'kum seme...aku ader confius skit la..cmner nak wat amik data yang ader dalam array, masuk kedalam array yang lain..ak tak de idea la...tolong beb..... Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted November 7, 2007 guna memcpy http://www.cplusplus.com/reference/clibrar...ing/memcpy.html Quote Share this post Link to post Share on other sites
nero 0 Report post Posted November 8, 2007 ok....thanks..bole tlong skit kat coding ni skit tak.....ak try nak wat objek dalam bntuk multidimensional...tapi tak jdk plk....cmne tu en. pot pet?# include <iostream.h># include <conio.h>class samp{ int a;public: samp(int n) { a = n;} int get_a() { return a; }};int main(){ samp ob[4][2] = { 1, 2, 3, 4, 5, 6, 7, 8, }; int i,j; samp *p; /* for(i=0; i<4; i++) { <-------NI yang ak try wat, tp tak jadk *p=obj; for(j=0; j<2; j++) {p=obj[]; }} */ for(i=0; i<4; i++){ for(j=0; j<2; j++){ cout<<"ob["<<i<<"]["<<j<<"]= "<<p->get_a() << ' ' ; cout<<"ob["<<i<<"]["<<j<<"]= "<<p->get_a() << "\n"; //p++; } } cout << "\n"; getch(); return 0;};[/codebox] Quote Share this post Link to post Share on other sites