![]() |
|
[C] function in c fill a table - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] function in c fill a table (/showthread.php?tid=6131881) |
function in c fill a table - blackcoder00 - Jan 6, 2021 i have some problem i couldn't fill some data in a table it's like an infinity loop PHP Code RE: function in c fill a table - HFDone - Jan 6, 2021 you didnt gave value for > int n int n = 10; RE: function in c fill a table - blackcoder00 - Jan 6, 2021 (Jan 6, 2021 01:16 PM)HFDone Wrote: you didnt gave value for > int n i will give it with the void saisie PHP Code RE: function in c fill a table - HFDone - Jan 6, 2021 main(){ int n = 20; int t[20]; saisie(n); remplire(t,n); affiche(t,n); return 0; } RE: function in c fill a table - Tafelpoot - Jan 6, 2021 as HFdone mentioned you have not initialized your int n; RE: function in c fill a table - Juice - Jan 19, 2021 This looks very complicated... very complex.... very intricate. RE: function in c fill a table - Inveil - Jan 26, 2021 I need help with this too RE: function in c fill a table - blackcoder00 - Jan 27, 2021 (Jan 26, 2021 05:36 PM)Inveil Wrote: I need help with this too pm me RE: function in c fill a table - TaZeer - Jan 30, 2021 (Jan 6, 2021 12:43 PM)blackcoder00 Wrote: i have some problem i couldn't fill some data in a table it's like an infinity loop Use *int on your function saisie to modify the 'n' value RE: function in c fill a table - saltycracker - Jan 30, 2021 Wow! I haven't programmed in C in years but I can see that you are lacking even the most fundamental understanding of the language. Example.. What is the function supposed to do? It makes no sense? Code void saisie (int n){The way you have it written.You have a function which accepts an integer and then you overwrite that integer via scanf and then throw the value away. |