deqna_aryna 0 Report post Posted July 23, 2004 akum...hi...sape2 plez la tolong deqna...ni thp nk muntah dah ni... deqna penin lg ni..ni pasal nk masukkan coding utk array..cth if kite masukkan nilai 20 (ulangan akan dilakukan sebanyak 20x pd output...) void CCreate::OnChangeGeneration() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask. "nak masuk kat dalam ni kan? deqna dh try tapi yang tu error..deqna try refer buku..cam tak jadik je" // TODO: Add your control notification handler code here } Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 24, 2004 boleh paste complete code yang ada error tu tak?kalau soalan gitu.. kita semua tak pasti macam mana perjalanan program nkoo? Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted July 27, 2004 (edited) deqna, program tu melibatkan looping, cthnya:int array[]; for (int i = 0;i<20;i++) { // buat print ke skrin kat sini }pandai-pandai lah fitkan code tu kat dlm program awak yer.. awak kalau nak belajar program dalam C++ , jgn terus lompat guna MFC. belajar dulu guna console. Edited July 27, 2004 by puteranetwork Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 27, 2004 (edited) kalau dengan perempuan..baik betul en puteranetworkint array[]; boleh ke buat array mcm tu? Edited July 27, 2004 by zeph Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted July 27, 2004 (edited) kalau dengan perempuan..baik betul en puteranetworkeh.. ye ke? takde lah, aku layan semuanya sama int array[]; boleh ke buat array mcm tu? ntah? main agak-agak je, sbb dah banyak luper. kalau silap betulkan lah ye en zeph..! int array[20] = "20";sbb dia nak display value "20" sebanyak 20 kali kan? so camtu le kot rupanya. Edited July 27, 2004 by puteranetwork Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted July 27, 2004 (edited) // zeph.. please delete this post/// takde butang delete pun//// takde? lorr.. takpelah. Edited July 28, 2004 by puteranetwork Quote Share this post Link to post Share on other sites
siti 0 Report post Posted July 28, 2004 int array[20] = "20"; ????? bahasa c++ ke? bahasa z++? Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 28, 2004 int my_array[]={1,4,2,3}; int my_array2[20]={0}; //isi semua dgn 0char my_array[]="abcdef34234234";char my_array[100]="1000"; Quote Share this post Link to post Share on other sites
aRmsTer 0 Report post Posted July 28, 2004 (edited) hahahahaa... z++.. nak jugak belajau..akum...hi...sape2 plez la tolong deqna...ni thp nk muntah dah ni... deqna penin lg ni..ni pasal nk masukkan coding utk array..cth if kite masukkan nilai 20 (ulangan akan dilakukan sebanyak 20x pd output...) jap2... kalau ikut ayat deqna ni.. (masukkan value(cth 20), output dia pon kuar 20 kali kan?) ini bukan array... ni mcm count utk looping...cin<<count;x=0;while x<= count{ cin<<value[x];x++;}y=0;while y<=count{ cout>>value[y];y++;}p/s: entah betul ke x coding aku ni.... pandai2 laa adjust balik.. aku mmg dah lupa dah syntax c++ Edited July 28, 2004 by aRmsTer Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 28, 2004 (edited) cin>>count; x=0; y=0; while (x<count) { cin>>value[x]; value[y]=value[x]; y++; x++; } y=0; while (y<count) { cout<<value[y]; y++; } Edited July 28, 2004 by zeph Quote Share this post Link to post Share on other sites
siti 0 Report post Posted July 28, 2004 (edited) cin>>count; x=0; while (x < count) { cin>>value[x]; x++; } x=0; while (x < count) { cout<<value[x]; x++; } Edited July 28, 2004 by siti Quote Share this post Link to post Share on other sites
aRmsTer 0 Report post Posted July 28, 2004 thnx for de correction there... so deqna, is these codes the one u want or actually awak nak tanya bende lain coz based on ur question(laahh) tis should be the correct answer (not de best but still acceptable) Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted July 28, 2004 (edited) int array[20] = "20"; ????? bahasa c++ ke? bahasa z++?pembetulan;int array[20] = {20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20}; memula ingat nak guna for loop then terus buat array print; #include <stdio.h> int main() { int array[20] = {20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20}; int index; for (index = 0; index < 20; index++) printf(" Array dalam %2d ialah %d\n", index, array[index]); return 0; }// armster tu punyer dah betul dah tu rasanya. Edited July 28, 2004 by puteranetwork Quote Share this post Link to post Share on other sites
raihan 0 Report post Posted August 22, 2004 (edited) int x = 'F'; // bolehchar y = 0x100; // tak bolehbukan ke int array[20] = "20"; // ????? boleh jalan gak ------------------------------------ edited again; adeh~ lupa lak principle dia (code atas tak jalan) but this must be work int x = 12338; // 0x00003032 (satu byte membazir :P) char *y = (char *)&x; printf("%s\n",y); ------------- output: 20 // also array concept minta maaf salah silap kod kat atas tu ek ~ Edited August 28, 2004 by raihan Quote Share this post Link to post Share on other sites
marliana 0 Report post Posted August 24, 2004 klik sini http://azri.free.fr Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted August 24, 2004 awak ni azri ke marliana? bagus jugak h/p tu Quote Share this post Link to post Share on other sites
raihan 0 Report post Posted August 28, 2004 hehe~ Quote Share this post Link to post Share on other sites