python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to detect apostrophe in a char* argument?
I have a c file such that I pass arguments to as such:
./cfile [-size number]
e.g.
./cfile -size 22
Here is an example code for such a file:
int main(int argc, char** argv) {
if (argv[1] != &qu...
Squarepeg
Votes: 0
Answers: 1
If Else statement not working as expected when passing arguments with spaces
I have a simple if-else that takes a command-line argument and returns a value from a dictionary. When I enter 'Darth Vader', it returns 'Luke, I am your None' instead of 'No, I am your father'.
It w...
A1live
Votes: 0
Answers: 2
How can I check the number of command line argument passed in Perl?
I have a script that runs in the following way:
perl testing.pl -grid 24 -range 97 ## Here, arguments passed are processed via getopt::Long module.
Now, I want to check the number of command-line a...
PPP
Votes: 0
Answers: 2
Using command line parameters outside of main function
I would like a program to read in a file entered by the user via the command line, which is then used in the main body of the code.
See example code below:
#include <iostream>
#include <fstre...
CAF
Votes: 0
Answers: 2