U
U
UA_Nikita2015-09-26 12:01:36
C++ / C#
UA_Nikita, 2015-09-26 12:01:36

How to add a scanf function parameter to the code so that punctuation marks are also read?

Punctuation marks like this(!"№;%:?*()_+,......)
here is part of the code
string str;
cout << "Vvedite slovo: ";
getline( cin, str );
cout < < "[COUT | CIN] " << str << "\n";
string s;
printf("%s","Slovo:");
scanf("%[az,AZ,0-9]s",s);
printf( "[SCANF | PRINTF] %s\n", s);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abcd0x00, 2015-09-26
@abcd0x00

This is some bullshit.
Either write in C using scanf() and printf() for I/O, or write in C++ using cin and cout for I/O.
And you can't mix.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question