473,320 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

main()

I've read that the only parameters that main takes other than a void is this
main(int argc,char *argv[])
I may be correct on this.
I want to take from the command line prompt 2 doubles, pass the values
stored in the array to another function which does some calculations and
returns the address of doubles to the main function.

rel.c /* name of source */

#include "main.h"
main.h reads as thus...
#include <stdio.h>
#include <math.h>

double relstr(double *p1,double *p2);
/* first line of rel.c */
main(int argc,char *argv[])
{if (argc!=2) {puts("command error"); exit(1);}
sscanf(argc,"%s",argv[1]);
double *p1=argv[0];
double *p2=argv[1];

I'm not quite sure what to return here and I've tried to compile this code
in many forms. I always get an error with parameter 1 of sscanf(). Should
the be a cast to a type or pointer to or from a type somewhere?

Bill


Nov 14 '05 #1
26 1616
Bill Cunningham wrote:
I've read that the only parameters that main takes other than a void is this
main(int argc,char *argv[])
I may be correct on this.
I want to take from the command line prompt 2 doubles, pass the values
stored in the array to another function which does some calculations and
returns the address of doubles to the main function.

rel.c /* name of source */

#include "main.h"
main.h reads as thus...
#include <stdio.h>
#include <math.h>

double relstr(double *p1,double *p2);
/* first line of rel.c */
main(int argc,char *argv[]) that's int main
{if (argc!=2) {puts("command error"); exit(1);} you want argc = 3
sscanf(argc,"%s",argv[1]); this cannot work
double *p1=argv[0];
double *p2=argv[1]; Horrible. You can't pretend that strings are pointers-to-double.
I'm not quite sure what to return here and I've tried to compile this code
in many forms. I always get an error with parameter 1 of sscanf(). Should
the be a cast to a type or pointer to or from a type somewhere?


It should certainly not be cast. Read the sscanf documentation: you
can't pass an integer (which is the type of argc) as the first parameter.

I'm not sure what you're trying to do, but this toy program might give
you some ideas:

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
double x1, x2;

if (argc != 3) {
puts("please supply two doubles");
exit(EXIT_FAILURE);
}

/* illustrates what argv[0] contains */
printf("This program is '%s'\n", argv[0]);

/* If you want proper error-checking, use strtod() */
x1 = atof(argv[1]);
x2 = atof(argv[2]);

printf("The two doubles entered were %g and %g\n", x1, x2);
printf("Their sum is %g\n", x1 + x2);

return 0;
}

Nov 14 '05 #2
"Bill Cunningham" <no****@nspam.net> wrote in message
news:10*************@corp.supernews.com...
I've read that the only parameters that main takes other than a void is this main(int argc,char *argv[])
I may be correct on this.
I want to take from the command line prompt 2 doubles, pass the values
stored in the array to another function which does some calculations and
returns the address of doubles to the main function.
I can't parse this into anything logical so I'll take a stab at what I
_think_ you want.
rel.c /* name of source */

#include "main.h"
main.h reads as thus...
#include <stdio.h>
#include <math.h>

double relstr(double *p1,double *p2);
/* first line of rel.c */
main(int argc,char *argv[])
{if (argc!=2) {puts("command error"); exit(1);}
sscanf(argc,"%s",argv[1]);
double *p1=argv[0];
double *p2=argv[1];

I'm not quite sure what to return here and I've tried to compile this code
in many forms. I always get an error with parameter 1 of sscanf(). Should
the be a cast to a type or pointer to or from a type somewhere?


Did you mean:

/* rel.c */
#include <stdio.h>
#include <stdlib.h>

double relstr(double d1, double d2);

int main(int argc, char *argv[]) {

double d1, d2, d3;

if (argc != 3) {
puts("command error");
exit(EXIT_FAILURE);
}

d1 = strtod(argv[1], NULL);
d2 = strtod(argv[2], NULL);

d3 = relstr(d1, d2);

/* whatever else you need to do */

exit(EXIT_SUCCESS);
}

--
Stephen Sprunk "Stupid people surround themselves with smart
CCIE #3723 people. Smart people surround themselves with
K5SSS smart people who disagree with them." --Aaron Sorkin

Nov 14 '05 #3
> I can't parse this into anything logical so I'll take a stab at what I
_think_ you want.
rel.c /* name of source */

#include "main.h"
main.h reads as thus...
#include <stdio.h>
#include <math.h>

double relstr(double *p1,double *p2);
/* first line of rel.c */
main(int argc,char *argv[])
{if (argc!=2) {puts("command error"); exit(1);}
sscanf(argc,"%s",argv[1]);
double *p1=argv[0];
double *p2=argv[1];

I'm not quite sure what to return here and I've tried to compile this code in many forms. I always get an error with parameter 1 of sscanf(). Should the be a cast to a type or pointer to or from a type somewhere?


Did you mean:

/* rel.c */
#include <stdio.h>
#include <stdlib.h>

double relstr(double d1, double d2);

int main(int argc, char *argv[]) {

double d1, d2, d3;

if (argc != 3) {
puts("command error");
exit(EXIT_FAILURE);
}

d1 = strtod(argv[1], NULL);
d2 = strtod(argv[2], NULL);

d3 = relstr(d1, d2);

/* whatever else you need to do */

exit(EXIT_SUCCESS);
}

I'm not familiar yet with the stdlib library functions. I'll have to
study them if the tutorial I'm using gets there.stod() I guess is string to
double. Just what I need. I need to get beyond stdio.h. Thanks.

Bill
Nov 14 '05 #4

"Allin Cottrell" <co******@wfu.edu> wrote in message
news:c6***********@f1n1.spenet.wfu.edu...
Bill Cunningham wrote:
I've read that the only parameters that main takes other than a void is this main(int argc,char *argv[])
I may be correct on this.
I want to take from the command line prompt 2 doubles, pass the values
stored in the array to another function which does some calculations and
returns the address of doubles to the main function.

rel.c /* name of source */

#include "main.h"
main.h reads as thus...
#include <stdio.h>
#include <math.h>

double relstr(double *p1,double *p2);
/* first line of rel.c */
main(int argc,char *argv[])

that's int main
{if (argc!=2) {puts("command error"); exit(1);}

you want argc = 3
sscanf(argc,"%s",argv[1]);

this cannot work
double *p1=argv[0];
double *p2=argv[1];

Horrible. You can't pretend that strings are pointers-to-double.
I'm not quite sure what to return here and I've tried to compile this code in many forms. I always get an error with parameter 1 of sscanf(). Should the be a cast to a type or pointer to or from a type somewhere?


It should certainly not be cast. Read the sscanf documentation: you
can't pass an integer (which is the type of argc) as the first parameter.

I'm not sure what you're trying to do, but this toy program might give
you some ideas:

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
double x1, x2;

if (argc != 3) {
puts("please supply two doubles");
exit(EXIT_FAILURE);
}

/* illustrates what argv[0] contains */
printf("This program is '%s'\n", argv[0]);

/* If you want proper error-checking, use strtod() */
x1 = atof(argv[1]);
x2 = atof(argv[2]);

printf("The two doubles entered were %g and %g\n", x1, x2);
printf("Their sum is %g\n", x1 + x2);

return 0;
}

Actually I wanted to divide the inputs,
n=x1/x2;
but thats' the right track. If I can do it in one file binary that would be
geat. I want to be able to type
rel 12 6
the result that should be returned is 2 or 2.0000 with zeros.
And what did you mean I ned argc to equal 3?

Bill
Nov 14 '05 #5
Bill Cunningham wrote:
#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
double x1, x2;

if (argc != 3) {
puts("please supply two doubles");
exit(EXIT_FAILURE);
}

/* illustrates what argv[0] contains */
printf("This program is '%s'\n", argv[0]);

/* If you want proper error-checking, use strtod() */
x1 = atof(argv[1]);
x2 = atof(argv[2]);

printf("The two doubles entered were %g and %g\n", x1, x2);
printf("Their sum is %g\n", x1 + x2);

return 0;
}
Actually I wanted to divide the inputs,
n=x1/x2;
but thats' the right track.


Whatever -- adding them was just illustrative.

If I can do it in one file binary that would be geat. I want to be able to type
rel 12 6
the result that should be returned is 2 or 2.0000 with zeros.
Replace the "%g" specifier for printf with, e.g. "%f" if you
want (the default) 6 decimal places, "%.4f" for 4 places...
And what did you mean I ned argc to equal 3?


I mean the argument count (argc) includes the name of the called
program. So if you want two numbers appended ("rel 12 6") you
require argc == 3 as the condition for valid input.

Allin Cottrell
Nov 14 '05 #6
Allin Cottrell <co******@wfu.edu> spoke thus:
main(int argc,char *argv[])

that's int main


In C99 - unadorned main is acceptable in C89.
{if (argc!=2) {puts("command error"); exit(1);}

you want argc = 3


I suspect Bill *really* wants argc!=3, although your included program
indicates that this was merely a typo :)

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #7
Allin Cottrell <co******@wfu.edu> wrote in message news:<c6***********@f1n1.spenet.wfu.edu>...
Bill Cunningham wrote:
#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
double x1, x2;

if (argc != 3) {
puts("please supply two doubles");
exit(EXIT_FAILURE);
}

/* illustrates what argv[0] contains */
printf("This program is '%s'\n", argv[0]);

/* If you want proper error-checking, use strtod() */
x1 = atof(argv[1]);
x2 = atof(argv[2]);

printf("The two doubles entered were %g and %g\n", x1, x2);
printf("Their sum is %g\n", x1 + x2);

return 0;
}


Actually I wanted to divide the inputs,
n=x1/x2;
but thats' the right track.


Whatever -- adding them was just illustrative.

If I can do it in one file binary that would be
geat. I want to be able to type
rel 12 6
the result that should be returned is 2 or 2.0000 with zeros.


Replace the "%g" specifier for printf with, e.g. "%f" if you
want (the default) 6 decimal places, "%.4f" for 4 places...
And what did you mean I ned argc to equal 3?


I mean the argument count (argc) includes the name of the called
program. So if you want two numbers appended ("rel 12 6") you
require argc == 3 as the condition for valid input.

Allin Cottrell

Hi Guys,
Great information. Till now,(ofcourse till the last min) I dont know
anything about strtod,atof and also %e,%f,%g stuffs. But I have
programmed for converting the given string in to the integers/doubles
manually and it have taken some time for me.
Anything interesting like this with you? Please leave them here(if you
have time). I could learn.
Thanks
ZAPPLE - My Computer is a clever machine, then me
Nov 14 '05 #8
Bill Cunningham wrote:
sscanf(argc,"%s",argv[1]);

Why don't you get a decent C book, work though the exercises, learn the
basics and STOP WASTING OUR TIME. You've been supposedly learning C for
a year or so, yet you don't have the fundamentals down.

You should be able to look up a function, like sscanf(), look at the
signature, and figure out whether your arguments match.


Brian Rodenborn
Nov 14 '05 #9
> Why don't you get a decent C book, work though the exercises, learn the
basics and STOP WASTING OUR TIME. You've been supposedly learning C for
a year or so, yet you don't have the fundamentals down.

You should be able to look up a function, like sscanf(), look at the
signature, and figure out whether your arguments match.


Brian Rodenborn


Everyone says "Get k&r2! Get k&r2!" I got k&r2 which isn't a tutorial
I've learned now but more of a reference work. Now that I'm working with
tutorials I'm learning alot more. So eat your heart out.

Bill

Nov 14 '05 #10
Bill Cunningham <no****@nspam.net> scribbled the following:
Why don't you get a decent C book, work though the exercises, learn the
basics and STOP WASTING OUR TIME. You've been supposedly learning C for
a year or so, yet you don't have the fundamentals down.

You should be able to look up a function, like sscanf(), look at the
signature, and figure out whether your arguments match.
Everyone says "Get k&r2! Get k&r2!" I got k&r2 which isn't a tutorial
I've learned now but more of a reference work. Now that I'm working with
tutorials I'm learning alot more. So eat your heart out.


Yes it's a tutorial. But it doesn't spoon feed you like other
tutorials do, instead it simply explains what C is like and leaves it
up to you to understand it. It's more like a description of the C
language than a "Let's learn C in 21 minutes!" kind of book.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"It sure is cool having money and chicks."
- Beavis and Butt-head
Nov 14 '05 #11
Bill Cunningham wrote:
Everyone says "Get k&r2! Get k&r2!" I got k&r2 which isn't a tutorial
I've learned now but more of a reference work. Now that I'm working with
tutorials I'm learning alot more. So eat your heart out.


Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?

Brian Rodenborn
Nov 14 '05 #12
Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?

I've never come across a decent C tutorial. K&r2 isn't it. Besides I
can't remember the day sometimes, let alone function parameters. That's why
I take aricept. I don't have alzheimers but my thinking processes are
confused by dysthymia and Major depressive disorders.
I have the intellect. But my learning is hindered. And I've always used
vod as the only parameter to main, up til now.

Bill

Nov 14 '05 #13
Hi,
I understood the programs.
ZAPPLE - My Computer is Clever
Nov 14 '05 #14


Bill Cunningham wrote:
Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?


I've never come across a decent C tutorial. K&r2 isn't it. Besides I
can't remember the day sometimes, let alone function parameters. That's why
I take aricept. I don't have alzheimers but my thinking processes are
confused by dysthymia and Major depressive disorders.
I have the intellect. But my learning is hindered. And I've always used
vod as the only parameter to main, up til now.


You certainly know enough to comment on the subject a month or so ago.

From: Bill Cunningham (no****@nspam.net)
Subject: Re: sscanf
Newsgroups: comp.lang.c
Date: 2004-04-18 10:34:07 PST

You said, "sscanf reads a string instead of input from a keyboard."

You've had ample opportunity to get it straight, even in that thread.
I think you are a fraud, a humbug. You may be able to
redirect my opinion should you supply medical statements of your
psychosis or pathology.
--
Al Bowers
Tampa, Fl USA
mailto: xa******@myrapidsys.com (remove the x to send email)
http://www.geocities.com/abowers822/

Nov 14 '05 #15
In <10*************@corp.supernews.com> "Bill Cunningham" <no****@nspam.net> writes:

Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?

I've never come across a decent C tutorial.


No one has ever managed to write one that could teach C even to an idiot.
So, give up C: you're clearly wasting your time.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #16

"Bill Cunningham" <no****@nspam.net> wrote in message
news:10*************@corp.supernews.com...
Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?
I've never come across a decent C tutorial. K&r2 isn't it. Besides I
can't remember the day sometimes, let alone function parameters.


To get the day.. look at your watch, in your calendar or consult your
computer...

You do NOT memorize function parameters -- you look them up and
then it may happen, at least of most ppl, that they start to come back
to you automatically over time. Until then, select function name and
press F1 to bring up it's help... or similar method in other compiler
environments.

But of course you should spend some time learning the two IMHO
most important "issues" in C learning:
- difference between function header declaration and function calls
- pointers -- why, when, where and how on both sides of a function call.
I have the intellect. But my learning is hindered. And I've always used vod as the only parameter to main, up til now.


Vod ? ;-)

And why did you do that while your reference specify other parameters? :)

- Sten
Nov 14 '05 #17
> So, give up C: you're clearly wasting your time.

Dan

I'll never give up C. I'll learn C. On Dennis Ritchie's eventual grave I
won't give up. No matter how long it takes me. Learn to love it.

Nov 14 '05 #18
> You do NOT memorize function parameters -- you look them up and
then it may happen, at least of most ppl, that they start to come back
to you automatically over time. Until then, select function name and
press F1 to bring up it's help... or similar method in other compiler
environments.

But of course you should spend some time learning the two IMHO
most important "issues" in C learning:
- difference between function header declaration and function calls
- pointers -- why, when, where and how on both sides of a function call.
I have the intellect. But my learning is hindered. And I've always used
vod as the only parameter to main, up til now.


Vod ? ;-)

And why did you do that while your reference specify other parameters? :)

- Sten


I don't know how Vod got in there. I think Dan Pop put it there.

Nov 14 '05 #19


You certainly know enough to comment on the subject a month or so ago.

From: Bill Cunningham (no****@nspam.net)
Subject: Re: sscanf
Newsgroups: comp.lang.c
Date: 2004-04-18 10:34:07 PST

You said, "sscanf reads a string instead of input from a keyboard."

You've had ample opportunity to get it straight, even in that thread.
I think you are a fraud, a humbug. You may be able to
redirect my opinion should you supply medical statements of your
psychosis or pathology.

I'm not a psychotic, I'm not a psychotic. Your talking about Dan Pop.
Besides we're talking about main() not sscanf(). I've always used main(void)
and just started using main(int argc,char *argv[])

Bill

Nov 14 '05 #20
Bill Cunningham wrote:
Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?
I've never come across a decent C tutorial. K&r2 isn't it. Besides I
can't remember the day sometimes, let alone function parameters.


You open K&R, you go to Appendix B (Standard Library) and look at
section B.1.3 (Formatted Input) where you find:

int sscanf(const char *s, const char *format, ...)
sscanf(s, ...) is equivalent to scanf(...) except that the input
characters are taken from the string s.

You can also refer to section 7.4 of the main text, where they have an
extensive explanation of scanf().
That's why
I take aricept. I don't have alzheimers but my thinking processes are
confused by dysthymia and Major depressive disorders.
If you are truely handicapped, I don't want to pick on you, but this
whole thing just seems funky to me.
I have the intellect. But my learning is hindered. And I've always used
vod as the only parameter to main, up til now.


Section 5.10 has a very good explanation of how command-line arguments
work including a nice diagram of the argv[] array and several examples
of how to use the values.

I find it hard to believe that you could look at K&R and get nothing
from it. The going may be slow at first, but the information is there
and in a well-presented manner. Reading each chapter and working the
problems should get you going.


Brian Rodenborn
Nov 14 '05 #21
> I find it hard to believe that you could look at K&R and get nothing
from it. The going may be slow at first, but the information is there
and in a well-presented manner. Reading each chapter and working the
problems should get you going.


It's not that I look at k&r2 and get nothing. I have learned from the
chapters. It's the appendices that really give me trouble. For example,
there's no tutorial on file streams in k&r2 (it's been a while since I
looked at my copy) FILE* it's talked about in the appendices but there's no
examples on how one would use it. Only the parameters for fopen() for
example are talked about. I'm just not good enough to read the prototypes
yet.

This is why I seldom respond to flames. You get nothing, learn nothing,
and everyone thinks you're putting them on.

---
When in doubt, ask Dan Pop.

Bill

Nov 14 '05 #22
Bill Cunningham wrote:
It's not that I look at k&r2 and get nothing. I have learned from the
chapters. It's the appendices that really give me trouble. For example,
there's no tutorial on file streams in k&r2 (it's been a while since I
looked at my copy) FILE* it's talked about in the appendices but there's no
examples on how one would use it.
This isn't true. File streams are covered in Chapter 7 - Input and
Output. There they cover character at a time and line file access. They
don't seem to have covered fread() and fwrite() though.
Only the parameters for fopen() for
example are talked about. I'm just not good enough to read the prototypes
yet.
What else did you want them to say about fopen()? It explains that fopen
makes a file available for access, it returns a FILE* and tells you that
the user needn't worry about the details of FILE. It shows the signature
of fopen() and explains what the two parameters do. After some
discussion of IO functions, it presents a complete example of a file
concatenation program using these concepts (plus argc and argv BTW).

Looks good to me.
This is why I seldom respond to flames. You get nothing, learn nothing,
and everyone thinks you're putting them on.


You frustrate us. You ask loads of questions, but seem to make little
progress.

Brian Rodenborn
Nov 14 '05 #23
Bill Cunningham wrote:
For example, there's no tutorial on file streams in k&r2


Chapter 7
(Section 7.5 for files, but a stream is a stream is a stream in C.)

That's eighteen pages and nine exercises in my copy; hardly too much to
ask, even though some knowledge of earlier chapters may be necessary.

--
++acr@,ka"
Nov 14 '05 #24
Bill Cunningham wrote:
I find it hard to believe that you could look at K&R and get nothing
from it. The going may be slow at first, but the information is there
and in a well-presented manner. Reading each chapter and working the
problems should get you going.

It's not that I look at k&r2 and get nothing. I have learned from the
chapters. It's the appendices that really give me trouble. For example,
there's no tutorial on file streams in k&r2 (it's been a while since I
looked at my copy) FILE* it's talked about in the appendices but there's no
examples on how one would use it. Only the parameters for fopen() for
example are talked about. I'm just not good enough to read the prototypes
yet.

This is why I seldom respond to flames. You get nothing, learn nothing,
and everyone thinks you're putting them on.

---
When in doubt, ask Dan Pop.

Bill


Go Bill. Keep trying. Keep asking. Many of us will try to help. I
understand that you have certain difficulties, memory, attention
span, etc. The normal RTFM admonition doesn't work well for you.

What does work?

--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 14 '05 #25
In article <10*************@corp.supernews.com>, no****@nspam.net says...
Everyone says "Get k&r2! Get k&r2!" I got k&r2 which isn't a tutorial
I've learned now but more of a reference work. Now that I'm working with
tutorials I'm learning alot more.


I'm glad you told us, because it isn't obvious.

--
Randy Howard
2reply remove FOOBAR

Nov 14 '05 #26
Dan Pop wrote:
In <10*************@corp.supernews.com> "Bill Cunningham" <no****@nspam.net> writes:
Then explain why you, after all this time, are unable to look at the
signature of function and give it the correct type arguments? I mean,
argc as the first argument to sscanf()? Not to mention trying to read
INTO argv[1]?


I've never come across a decent C tutorial.

No one has ever managed to write one that could teach C even to an idiot.
So, give up C: you're clearly wasting your time.


Too harsh! Bill Cunningham has said that he has some cognitive
problems. That does not necessarily make him an "idiot". He
won't earn a living as a C programmer, but he may program for
his own use and amusement.

Allin Cottrell
Nov 14 '05 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

192
by: Kwan Ting | last post by:
The_Sage, I see you've gotten yourself a twin asking for program in comp.lang.c++ . http://groups.google.co.uk/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&th=45cd1b289c71c33c&rnum=1 If you the oh so mighty...
45
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes...
15
by: Fred Zwarts | last post by:
In C++ execution of a program starts already before execution of main(). The initialization of static variables defined outside the scope of main is performed first. I could imagine a program where...
75
by: Beni | last post by:
I have been programming in C for about a year now. It sounds silly, but I never took the time to question why a C(or C++ or Java) program execution begins only at the main(). Is it a convention or...
5
by: Seong-Kook Shin | last post by:
Hi, I'm reading Steve's "C Programming FAQs" in book version, and have two question regarding to Q11.16 ... Also, a `return' from `main' cannot be expected to work if data local to main might be...
13
by: Sokar | last post by:
I have my main function set up as int main(int argv, char *argv) so taht i can read in a variable which is passed to the program on the command line. The problem is that main calls other...
16
by: Geoff Jones | last post by:
Hi What is the closest equivalent to Main in a VB.Net form? Geoff
2
by: psuaudi | last post by:
I have a main query that I would like to call two different subqueries. In MS Access, I usually just save the two subqueries as separate queries which are then called by a third separate and main...
28
by: ravi | last post by:
Hello everybody, I am writing a small application which does some work before the user main function starts execution. I am trying to #define the main function. But the problem is that,
11
by: aarklon | last post by:
Hi all, I have heard many discussions among my colleagues that main is a user defined function or not. arguments in favour:- 1) if it is built in function it must be defined in some header...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.