S
S
Sratimon12016-09-20 19:49:07
C++ / C#
Sratimon1, 2016-09-20 19:49:07

What does this c++ notation mean?

int main(int argc, char* argv[]){
char* filename = argc >= 2 ? argv[1] : "Image.jpg";

This is the first time I've seen such a post and I have no idea how to google it!
I study openCV C ++
link to all code from the lesson
If possible, then explain, if it takes a long time, at least give a link or tell me what it's called.
I have one idea is something like if else .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D', 2016-09-20
@Denormalization

https://ru.wikipedia.org/wiki/%D0%A2%D0%B5%D1%80%D...

1
15432, 2016-09-20
@15432

If the number of command line arguments is greater than or equal to 2 (the first argument is always present, the name of the program being called), then take the filename from the argument, otherwise use the default name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question