buffer

InputMismatchException when working with the scanner

Why does an error occur if you uncomment a commented-out line? In the file, one line is exactly the same as assigned to the ... .Scanner.nextInt(Scanner.java:2076) at Metro.readMetro(Metro.java:21) at Metro.main(Metro.java:64) "376 933" "376 933"

Comments count / / E / * * / in C

I'm trying to make a little program in C that opens a file .txt, .c or any other in Read Mode, to count the comments made wit ... / or /*. Even the store part in buff is working, but it seems to me that it is not traversing the vector looking for matches.

How do I use fgets instead of gets?

Before "talking" about my problem, look at my code first and ignore the accentuation errors in the console if it is going to ... is working in my codes, but I want to avoid. Does anyone know how to make fgets have the characters be detected by the IF

Difference between fflush and setbuf

What is the difference between functions fflush(stdin); e * * setbuf(stdin, NULL);**? When to use and when not to use each?

Transferring image via socket, the image turns black

My server sends a command to the client and the client sends a PrintScreen to the server using this Code: Image printScreen ... rnImage; } I have already tested the image before sending, it actually printa a valid image, the problem is in the receipt.

What is an output buffer?

Reading is Answer , I came up with this doubt. What is a output_buffer ?

How does buffer work using printf and scanf?

Using printf, when I do: printf("\n\tQualquer coisa\n"); Does it insert this first into a buffer and then print to the scr ... at reports Well the behavior of this, please pass me the link, because I searched the C standard and did not find. Grateful.

Reading CHAR in C that works with %s but not with % c, why? And how does increment on a pointer work?

I hosted The Complete code in PASTEBIN: https://pastebin.com/feKaxAiz . this is a matrix where it is possible to perform t ... ). } } } I tried to do the count using the operator ++ of increment in the form * cont {, but it did not work.

Buffer cleaning after getchar

Good Morning, Wanted to know how I can optimize the buffer cleaning by using the function getchar (), as an example follow ... e following output without letting me enter the gender: Enter salary: 100 enter gender: tax 0.00 Thanks for the help.