Jump to content

C programing help required

Go to solution Solved by 79wjd,

So you want to read input from a file.....look up getline() function 

hello, I am learning to program with c and im stuck with this problem. I have this file detale.txt, and I need to set its first number as a vareable. After that I have to use its value for 3 different array sizes(2 ints 1 float).

Also I have to take vlaues of these 3 arrays from file (first array- first column (exept that first value used for setting arrays size), 2 array- 2nd column, 3rd array- 3rc column. I would be greatfull for help. Im noob programer :D..

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Gamergod88 said:

hello, I am learning to program with c and im stuck with this problem. I have this file detale.txt, and I need to set its first number as a vareable. After that I have to use its value for 3 different array sizes(2 ints 1 float).

Also I have to take vlaues of these 3 arrays from file (first array- first column (exept that first value used for setting arrays size), 2 array- 2nd column, 3rd array- 3rc column. I would be greatfull for help. Im noob programer :D..

This looks like homework, which I for one will not do for you. You haven't even asked a specific question, all you have done is vomit the spec and ask for help in an ambiguous manor...

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

This looks like homework, which I for one will not do for you. You haven't even asked a specific question, all you have done is vomit the spec and ask for help in an ambiguous manor...

It is part of my homework, im stuck on this part, so i figured someone could help :D

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Nuluvius said:

This looks like homework, which I for one will not do for you. You haven't even asked a specific question, all you have done is vomit the spec and ask for help in an ambiguous manor...

and a specific question would be: how to use first value of file as these 3 arrays sizes...

Link to comment
Share on other sites

Link to post
Share on other sites

So you want to read input from a file.....look up getline() function 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, djdwosk97 said:

So you want to read input from a file.....look up getline() function 

Thank you, sir

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×