Jump to content

scanf("%*[^\n]")????


Guest tsenart

Recommended Posts

Posted

Nunca tinha visto esse tipo de expressões, mas se for de encontro a expressões regulares em UNIX talvez poderá significar a leitura de qualquer tecla (*) que comece por '\n'. Mas isso é um paradoxo pois de premimos alguma tecla tem de ter alguma coisa. Se for em ficheiros tinha sentido que seria a leitura de qualquer linha que estivesse em  branco.

Mas não me parece que seja isso... Vou investigar sobre o assunto, se alguém souber pf que diga.

"Nunca discutas com um idiota. Eles arrastam-te até ao seu nível e depois ganham-te em experiência"

Posted

Isso lê uma string ate encontrar um "\n", ignorando os espaços,ao contrario do scanf com %s,  é identico ao gets,fgets,readline,etc...

Engenharia de Redes e Sistemas Informáticos, DCC-FCUP. www.dcc.fc.up.pt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.