473,386 Members | 1,752 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,386 software developers and data experts.

how to write a program that takes arguments from commandline?

Hi,

I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. Let call the program:
program.exe.

Could somebody shortly explain how I get this behaviour:

C:>program -help or C:>program -h
printf("\nBla. bla. Here is some help and arguments\n").... etc.

C:>program -dt=0.1 -tend=10 (etc. additional switches might be added).
In the program:

float (or double) dt should become 0.1. The integer variable named
"tend" should be assigned respectively to 10.

In case of any problems such as for instance C:>program dt=adg, the
program should respond with something like "dt: Invalid syntax. Exiting.".

I suspect that one should change the program such that "int main(??
something goes in here, right?)" instead of int main(void), but I'm not
really sure of how to address this problem. If somebody has any sample
code in C to post, I would be very happy.

Thanks in advance for any hints...
Med venlig hilsen / Best regards
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Feb 11 '06 #1
26 2779
In article <j4************@news.tdc.dk>,
=?ISO-8859-1?Q?Martin_J=F8rgensen?= <un*********@spam.jay.net> wrote:
I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. I suspect that one should change the program such that "int main(??
something goes in here, right?)" instead of int main(void), but I'm not
really sure of how to address this problem.


Ummm, I cannot think of any introductory C text which does not
cover the mechanics of passing in arguments.

The harder part is in cleanly and efficiently parsing what gets passed in,
especially if some options modify the meaning of others or some
options cannot co-exist with others. For the mechanics, see most
any program and look for argc and argv .
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
Feb 11 '06 #2
You're right, when you define main, you do:
int main(int argc, char *argv[])
argc is the number of arguments specified, program.exe would count as
an argument, too.
argv is the arguments given. It's a constant array, so it starts at [0]
(that would be program.exe). [1] would be -h or -help, and so on. I've
seen argv written as char **argv rather than the conventional char
*argv[], but I guess it's down to you.

One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment.

Feb 11 '06 #3
"Martin Jørgensen" <un*********@spam.jay.net> wrote in message
news:j4************@news.tdc.dk...
Hi,

I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. Let call the program:
program.exe.

Could somebody shortly explain how I get this behaviour:

C:>program -help or C:>program -h
printf("\nBla. bla. Here is some help and arguments\n").... etc.

C:>program -dt=0.1 -tend=10 (etc. additional switches might be added).
In the program:

float (or double) dt should become 0.1. The integer variable named
"tend" should be assigned respectively to 10.

In case of any problems such as for instance C:>program dt=adg, the
program should respond with something like "dt: Invalid syntax. Exiting.".

I suspect that one should change the program such that "int main(??
something goes in here, right?)" instead of int main(void), but I'm not
really sure of how to address this problem. If somebody has any sample
code in C to post, I would be very happy.

Thanks in advance for any hints...


Maybe this is relevant:
http://c-faq.com/misc/argv.html
Feb 11 '06 #4
Alvin wrote:
[ much snippage ]

One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment.

Wrong completely. 'if (argv[1] == "-help")' can never be expected to
'work' in your wildest dreams. argv[1] is a char* supplied by the
command processor, "-help" is a char* to an anonymous array of char
somewhere in memory. They will not ever be equal. Never.

strcmp() is your friend.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Feb 11 '06 #5
boa
Joe Wright wrote:
Alvin wrote:
[ much snippage ]

One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment. -------^^^^^^^^^^^^^^^^
Did you miss this part?

Wrong completely. 'if (argv[1] == "-help")' can never be expected to
'work' in your wildest dreams. argv[1] is a char* supplied by the
command processor, "-help" is a char* to an anonymous array of char
somewhere in memory. They will not ever be equal. Never.

strcmp() is your friend.

boa
Feb 11 '06 #6
boa wrote:
Joe Wright wrote:
Alvin wrote:
[ much snippage ]

One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment.
-------^^^^^^^^^^^^^^^^
Did you miss this part?

I don't think so. What might I have missed? Sarcasm? Maybe.

Wrong completely. 'if (argv[1] == "-help")' can never be expected to
'work' in your wildest dreams. argv[1] is a char* supplied by the
command processor, "-help" is a char* to an anonymous array of char
somewhere in memory. They will not ever be equal. Never.

strcmp() is your friend.

boa

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Feb 11 '06 #7
*hits forhead*
Should have thought of using that before!
Thanks very much, Joe! I was worried I was going to get a stingy reply
with no help at all.

Feb 11 '06 #8
"Alvin" <al***********@gmail.com> writes:
*hits forhead*
Should have thought of using that before!
Thanks very much, Joe! I was worried I was going to get a stingy reply
with no help at all.


Should have thought of using what before?

Don't assume we can easily see the article to which you're replying.
Please read <http://cfaj.freeshell.org/google/>.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 11 '06 #9
boa
Joe Wright wrote:
boa wrote:
Joe Wright wrote:
Alvin wrote:
[ much snippage ]
One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment.


-------^^^^^^^^^^^^^^^^
Did you miss this part?

I don't think so. What might I have missed? Sarcasm? Maybe.

My mistake. I messed up and for some reason thought that you responded
to someone other than the OP, and thought that you didn't "get" the
(rather poor) example of why one cannot compare string values like that
in C.

Sorry about that.
boa
[snip]
Feb 11 '06 #10
stathis gotsis wrote:
-snip-
Maybe this is relevant:
http://c-faq.com/misc/argv.html


Thanks. That looks exactly like the place to start. Also thanks to the
other answers. I assume argc contains the number of (space-separated)
arguments.
Med venlig hilsen / Best regards
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Feb 11 '06 #11
Martin Jørgensen <un*********@spam.jay.net> writes:
stathis gotsis wrote:
-snip-
Maybe this is relevant:
http://c-faq.com/misc/argv.html


Thanks. That looks exactly like the place to start. Also thanks to the
other answers. I assume argc contains the number of (space-separated)
arguments.


The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.

argc is the number of valid elements of the array pointed to by argv.
If you invoke your program with 2 command-line arguments, argc will be 3.
argv[0] probably points to (some form of) the name of your program;
argv[1] and argv[2] point to your command-line arguments.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 11 '06 #12
On 11 Feb 2006 11:21:59 -0800, in comp.lang.c , "Alvin"
<al***********@gmail.com> wrote:
One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work.


you can't compare strings like that. This is why strcmp and its
friends exist.,
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Feb 12 '06 #13
On Sat, 11 Feb 2006 21:08:53 +0100, in comp.lang.c , boa
<bo*****@gmail.com> wrote:
Joe Wright wrote:
Alvin wrote:
[ much snippage ]

One problem I've run into is this: when testing for an argument, say:
if(argv[1] == "-help")
in your case, it doesn't work. If you try:
---
if(argv[1] == "-help")
printf("\n<help>");
else
printf("\nyou typed %s", argv[1]);
---
then no matter what, it drops to the else statment.

-------^^^^^^^^^^^^^^^^
Did you miss this part?


No, he didn't. Its meaningless to compare strings using ==, unless
both are the same object it will almost inevitably fail (all you're
doing is comparing the pointers). So naturally it drops down to the
else.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Feb 12 '06 #14
Martin Jørgensen wrote:
I suspect that one should change the program such that "int main(??
something goes in here, right?)" instead of int main(void),
but I'm not
really sure of how to address this problem. If somebody has any sample
code in C to post, I would be very happy.


/* BEGIN type_.c */
/*
** This is a demonstration of a way to use fscanf
** to read lines from text files.
*/
#include <stdio.h>

#define ARGV_0 type_
#define LINE_LEN 250
#define str(s) # s
#define xstr(s) str(s)

int main(int argc, char *argv[])
{
int rc;
FILE *fd;
char line[LINE_LEN + 1];

if (argc > 1) {
while (*++argv != NULL) {
fd = fopen(*argv, "r");
if (fd != NULL) {
do {
rc = fscanf(fd,
"%" xstr(LINE_LEN) "[^\n]%*[^\n]", line);
if (!feof(fd)) {
getc(fd);
}
if (rc == 0) {
*line = '\0';
}
if (rc != EOF) {
puts(line);
}
} while (rc == 1 || rc == 0);
fclose(fd);
} else {
fprintf(stderr,
"\nfopen() problem with \"%s\"\n", *argv);
break;
}
}
} else {
puts(
"Usage:\n>" xstr(ARGV_0)
" <FILE_0.txt> <FILE_1.txt> <FILE_2.txt> ...\n"
);
}
return 0;
}

/* END type_.c */
--
pete
Feb 12 '06 #15
Keith Thompson wrote:
Martin Jørgensen <un*********@spam.jay.net> writes:
stathis gotsis wrote:
-snip-

Maybe this is relevant:
http://c-faq.com/misc/argv.html
Thanks. That looks exactly like the place to start. Also thanks to the
other answers. I assume argc contains the number of (space-separated)
arguments.

The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.


If the arguments isn't space-separated, how else would they be separated?
argc is the number of valid elements of the array pointed to by argv.
If you invoke your program with 2 command-line arguments, argc will be 3.
argv[0] probably points to (some form of) the name of your program;
argv[1] and argv[2] point to your command-line arguments.


Just as I thought.
Med venlig hilsen / Best regards
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Feb 12 '06 #16
pete wrote:
-snip-
/* END type_.c */


Thanks for the example. Looks a little advanced but I'll try it out...
Med venlig hilsen / Best regards
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Feb 12 '06 #17
"Martin Jørgensen" <un*********@spam.jay.net> wrote in message
news:e0************@news.tdc.dk...
Keith Thompson wrote:
The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.


If the arguments isn't space-separated, how else would they be separated?


I've encountered two variations:

program argument1,argument2,argument with space,,argument 5

program/argument1/argument2/argument with space//argument 5

These both got argc == 6 with

argv[0] = "" (neither of them gave the program name in any form)
argv[1] = "argument1"
argv[2] = "argument2"
argv[3] = "argument with space"
argv[4] = ""
argv[5] = "argument 5"

The touted advantage of both was that you could have spaces, or even empties,
in the list. One of them discarded leading and trailing blanks. The other
didn't. I don't recall which now, but for the one that didn't, committing the
typo of

program argument1, argument 2

got you

argv[1] = "argument1"
argv[2] = " argument 2"

I was targeting both of these at the same time, so I just coded to remove
leading and trailing blanks no matter what.

- Bill
Feb 12 '06 #18
Martin Jørgensen wrote:

pete wrote:
-snip-
/* END type_.c */


Thanks for the example. Looks a little advanced but I'll try it out...


The command line agurment part
isn't especially advanced, I don't think.

The fprintf part *is* a little bit advanced.

--
pete
Feb 12 '06 #19
pete wrote:

Martin Jørgensen wrote:

pete wrote:
-snip-
/* END type_.c */


Thanks for the example.
Looks a little advanced but I'll try it out...


The command line agurment part
isn't especially advanced, I don't think.


But I should explain it anyway.

For this form of main: int main(int argc, char *argv[]);

argc is the number of command line arguments.
argv is the NULL terminated array of pointers to strings,
where the strings are command line arguments.
The name of the program is the first argument.

A system need not support command line arguments at all,
in which case arc may be equal to zero,
this something that should be checked for.
If command line arguments are supported,
then the first one will be the name of the program.

--
pete
Feb 12 '06 #20
pete wrote:
A system need not support command line arguments at all,
in which case arc may be equal to zero,


argc

--
pete
Feb 12 '06 #21
Martin Jørgensen wrote:
Hi,

I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. Let call the program:
program.exe.

Could somebody shortly explain how I get this behaviour:

C:>program -help or C:>program -h
printf("\nBla. bla. Here is some help and arguments\n").... etc.

C:>program -dt=0.1 -tend (etc. additional switches might be added).
In the program:

float (or double) dt should become 0.1. The integer variable named
"tend" should be assigned respectively to 10.

In case of any problems such as for instance C:>program dt*g, the
program should respond with something like "dt: Invalid syntax. Exiting.".

I suspect that one should change the program such that "int main(??
something goes in here, right?)" instead of int main(void), but I'm not
really sure of how to address this problem. If somebody has any sample
code in C to post, I would be very happy.

Thanks in advance for any hints...
Med venlig hilsen / Best regards
Martin Jørgensen


Hi,

The answers from other persons have been very complete, and fully
according to the objective of this group. However, I thing that the
subject, from the point of view of learning, can not be complete
without expend a few lines to reference the existence of the function
"getopt" (and, sometimes, "getopts"). Their usage and validity for one
specific operating system could be considered off-topic.

Feb 12 '06 #22
Martin Jørgensen <un*********@spam.jay.net> writes:
Keith Thompson wrote:
Martin Jørgensen <un*********@spam.jay.net> writes:
stathis gotsis wrote:
-snip-
Maybe this is relevant:
http://c-faq.com/misc/argv.html

Thanks. That looks exactly like the place to start. Also thanks to the
other answers. I assume argc contains the number of (space-separated)
arguments.

The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.


If the arguments isn't space-separated, how else would they be separated?


Who knows? A C program gets zero or more arguments when it's
executed; it can retrieve them via argc and argv. The way those
arguments were generated is outside the scope of the C language.

Wandering a little off-topic ...

In a Unix-like system, programs are often invoked from a shell
command line. Shells *can* use spaces to delimit arguments, but the
syntax is more complex; for example:
my_program 'foo bar' baz
will invoke my_program with two arguments: "foo bar" and "baz".

Programs can also be invoked directly using one of the exec*() family
of functions. For example:

execlp("my_program", "foo bar", "baz", (char*)NULL);

Here, the arguments are provided directly as separate strings; they're
not delimited at all.

As I said, the details are off-topic; I discuss them here merely to
provide an example of the kind of thing that can happen before your
program is executed.

If you're writing a shell yourself, you can pick any mechanism you
like for constructing the arguments for the programs you invoke.
Delimiting the arguments with spaces (or, more generally, with
whitespace) is a reasonable approach, but it's not the only one.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 12 '06 #23
On Sun, 12 Feb 2006 15:23:41 +0100, in comp.lang.c , Martin Jørgensen
<un*********@spam.jay.net> wrote:
Keith Thompson wrote:

The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.


If the arguments isn't space-separated, how else would they be separated?


colons, tabs, semicolons, slashes, any number of possibities.
Different OSes do different things.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Feb 13 '06 #24

"tmp123" <tm****@menta.net> writes:
Martin Jørgensen wrote:
I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. Let call the program:
program.exe.
The answers from other persons have been very complete, and fully
according to the objective of this group. However, I thing that the
subject, from the point of view of learning, can not be complete
without expend a few lines to reference the existence of the function
"getopt" (and, sometimes, "getopts"). Their usage and validity for one
specific operating system could be considered off-topic.


The manual page for 'getopt' on HP-UX lists the following:
STANDARDS CONFORMANCE
getopt(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
optarg: AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
opterr: AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
optind: AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
optopt: AES, SVID3, XPG4, POSIX.2

There are most likely public domain implementations of it as well.
Feb 13 '06 #25
Mark McIntyre <ma**********@spamcop.net> wrote:
On Sun, 12 Feb 2006 15:23:41 +0100, in comp.lang.c , Martin Jørgensen
<un*********@spam.jay.net> wrote:
Keith Thompson wrote:

The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.


If the arguments isn't space-separated, how else would they be separated?


colons, tabs, semicolons, slashes, any number of possibities.
Different OSes do different things.


In fact, there's nothing in the Standard that requires the contents of
argv to come from a command line. One could have an implementation on an
all-WIMP environment that pops up a little dialog with an extensible
list of text entry fields each time a program is run.

Richard
Feb 13 '06 #26
tmp123 wrote:
-snip-
The answers from other persons have been very complete, and fully
according to the objective of this group. However, I thing that the
I fully agree.
subject, from the point of view of learning, can not be complete
without expend a few lines to reference the existence of the function
"getopt" (and, sometimes, "getopts"). Their usage and validity for one
specific operating system could be considered off-topic.


I will try google for that. Thanks for all the answers from everyone...
I'll get back if I run into trouble.
Med venlig hilsen / Best regards
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
Feb 14 '06 #27

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

Similar topics

1
by: Arnold | last post by:
I need to modify my existing program into two separate executables. The first exe will be executed once to initiate a hardware card, the second program exe can be called multiple times to process...
1
by: Juan Romero | last post by:
Hey guys, I need to launch an external application, but I need to launch it with some command line arguments. Now the thing is that I need to launch it as a process. For example: Dim p As New...
1
by: Rvo | last post by:
I'm writing an application that should work both as a GUI and a commandline program. When running from commandline I want to give all output to the commandline instead of showing it it an own...
5
by: shawn a | last post by:
I havet these 2 files in the same dir. This is code im writing to learn pythong mkoneurl.py: #! /usr/bin/env python import make_ou_class run = make_ou_class.makeoneurl() ...
2
by: bidalah | last post by:
Hi, I have created a program which opens up ".pcfs" files, a kind of text file unique to my program. I want to be able to click on these files and have the program launch AND load the contents...
3
by: balakrishnan.dinesh | last post by:
hi frndz, As we know that, we can pass command line agrument for C using "scanf" commands, So as same as that, Is there any way to pass those commandline arguments through php code to C and...
5
by: kris | last post by:
Hi I have written a program which prints the hostid on a linux system. The programm uses gethostid() function call which is defined in the library file unistd.h. But my programm gets compiled...
25
by: mereba | last post by:
Hello My country Ghana is changing its currency. I want to write a small programme in C++ that can covert from the old currency into the new one. I would like this programme to run behind a simple...
3
by: Ariharan | last post by:
Explain me how to compile and run a C program in commandline(Windows XP Turbo C++ Version 3.0) The program must also accept commandline arguments... Explain with example program to read a number...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.