470,636 Members | 1,610 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Can one of you C guru's help me please???


I am a new to this board and came here out of desparation....

I need to modifiy a C program to allow the workareas (there could be up to 30) it uses to be defined externally and passed to the C program, also I need to pass the lengths of the work areas.

I have exhausted my limited knowledge of C is there any of you folks that can provide some assistance.

I will tell you right now, i am one of those old dinosaurs that still writes programs in machine language and I guess C is just to modern for me to understand.

Thanks for any help provided.
Jul 11 '06 #1
2 1509
9,065 Expert Mod 8TB
ok the entry point of a C program is

Expand|Select|Wrap|Line Numbers
  1. int main( int argc, char **argp )
  2. {
  3.    /* Program code here */
  4. }
argc gives the number of command line arguments and argp is an array of pointers to these arguments, note that the prgram name is always in the first one of these.

By processing the data in argc and argp you can pass data into a program at run time, so you can pass the sizes of your workareas on the command line, i.e.

MyProgram 1024 1024 2048 4096

This in main will result with


you can use strtoul to convert the strings to there binary values.
Jul 12 '06 #2

Thanks.. thats a good start.
Jul 12 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Gabriel | last post: by
4 posts views Thread by Accolo1 | last post: by
3 posts views Thread by Richard | last post: by
2 posts views Thread by LJ | last post: by
3 posts views Thread by Michael Suess | last post: by
16 posts views Thread by Singulus | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.