473,794 Members | 2,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
Hello,

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 1701
Banfa
9,065 Recognized Expert Moderator Expert
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. }
  5.  
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

argc=5
argp[0]="MyProgram"
argp[1]="1024"
argp[2]="1024"
argp[3]="2048"
argp[4]="4096"

you can use strtoul to convert the strings to there binary values.
Jul 12 '06 #2
jdechiricio
3 New Member
Banfa,

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

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

Similar topics

8
2259
by: Gabriel | last post by:
Hello everyone. If you were to code a secure membership system in PHP using MySQL with the follwing features: * a signup function where the user gets an email with a random password * passwords stored encrypted in database * login-system * password recovery tools * a system for secure-cookies
11
3100
by: Mike Cox | last post by:
After writing an article trashing java, and C++, notable LISP guru Paul Graham is getting roasted on slashdot. Apart from AutoCAD and Emacs, what has LISP done anyway? Most real work is done in C++ or C in the case of systems development. Perl is useful, but only for dynamic web content or simple sysadmin scripts. Most slashdotters think the same! Some are comparing Graham to Eric S. Raymond for his snobery. LISP's era ended when...
2
2707
by: rmn | last post by:
Hi, I'm looking for the translation betwen the color spaces, but I must be mistaken with the methods to use, losing the values. Please, I need a little help of a "coloured guru". ----------------------------------------------------- import java.awt.*; import java.awt.image.ColorModel; import java.awt.color.ColorSpace; .... ....
4
2935
by: Accolo1 | last post by:
Help we are looking for this person, do you know them? William wjohnson@accolo.com Title: BEA WebLogic Portal Guru Job #: 03-04468 Check the pulse of your career! Evolve our eCommerce web portal centra nervous system with your advanced knowledge of BEA WebLogic portal an application servers, and J2EE. Using advanced open architectur
3
1177
by: Richard | last post by:
Trying to wrap my brain around Regex for the first time... I need to be able to replace Sql @NamedParameters with "?" for compliance with an extremely lame 3rd party Odbc driver. I know that this should be fairly straighforward in Regex but I'm not a Regex guru. Does anybody know how to turn this {not real Sql but demonstrates my issue}: SELECT * FROM Customers WHERE State=@State AND LastName LIKE @LastName into this
2
943
by: LJ | last post by:
Hi there security guru! I have a simple question that boggles my mind. I have written a VB6 application that creates a file on a fileserver. Obviously, the user has sufficient security rights to launch the application, which in turn has enough security rights to create and alter that file. Once the file has been created, the application itself does not allow the user to delete it and all changes to it are recorded in the file itself. ...
0
1353
by: Curt | last post by:
If you are a guru in VB 2005 and have worked with Crystal Reports. I need to hire you to help me. Please email me at CurtTampa at my gmail account. I am ONLY Interested if you are in the Tampa FL area. I expect to pay you to come to my office and help me with some very weird problems. I am not interested in remote access at this moment, unless I can find no one in Tampa that can help.
3
1474
by: Michael Suess | last post by:
Hi, please feel free to correct me if this is the wrong group to ask this question. I have a blog about parallel programming and concurrency (http://www.thinkingparallel.com if you are interested). I would like to do some interviews with the so-called "parallel programming gurus" of our time and ask them only 10 short questions about their particular parallel programming system. I have come up with the following list of people (in no...
16
5907
by: Singulus | last post by:
Hello all, I've searched for similar threads, I've found some bit of useful info here and there, but nevertheless I want to post my questions...So, how can I (we, in fact the forum can benefit from the discussion, this is the point here) become C++ gurus? I have 5 years of working experience with C/C++, I know that this can be very ambiguous thing, but anyway...I've come to the point where I want to structure and organize my further...
1
4464
by: stevenjs | last post by:
Greeings, all, Flash 8 has quiz templates which are coded for multiple choice, true/false, text statement, and matching types of questions, along with hotspots and probably anoher type I am forgetting. The test taker makes their selection(s) or answers, and clicks a "check answer" button. They then get a feedback statements depending on whether they have answered correctly or not. Many questions involve multiple selections to be correct, but...
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9035
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.