Skip to main content

All Questions

Tagged with
-3 votes
1 answer
118 views

How to interface with a UNIX port? [closed]

I have encountered this same question in numerous forms over the past year, and have not been able to find the solution I am after. As the question has yet again reared its head, I am asking here with ...
BrownianBridge's user avatar
0 votes
0 answers
109 views

How to properly handle byte buffers from C to Ada?

I'm trying to create a simple Ada program that would encrypt/decrypt files using the OpenSSL libcrypto library. One of the issues I'm facing is handling output streams properly. Trying to achieve ...
Adam's user avatar
  • 67
1 vote
1 answer
1k views

ESP32 CAM only Web Server no Streaming

I connected esp32 cam using CameraWebServerStream in Arduino. I used a static ip address using port forwarding. However, when I enter the web server, the live streaming does not work. (Capture works ...
JJung's user avatar
  • 23
-1 votes
1 answer
126 views

Concept of a Stream Device

In my OS class, professor mentions that there are Stream and Storage devices. I mean to ask about Stream devices. I've also heard the terminology character devices. On a Linux VM, the corresponding ...
user129393192's user avatar
0 votes
0 answers
193 views

File descriptors, terminal, and open file description

Consider this simple program: #include <unistd.h> int main () { write(STDIN_FILENO, "hello\n", 6); return 0; } and that the output will be viewed on the terminal even if I ...
user129393192's user avatar
1 vote
3 answers
149 views

Print in terminal after`freopen("file.txt", "wb", stdout);` (or similar solution to preserve a printing function)

I want to store the printed output of a function with freopen("file.txt", "wb", stdout); (or another solution, but the function matrix_output_printf() should remained untouched. ...
ecjb's user avatar
  • 5,361
1 vote
3 answers
141 views

Stream the output of a void function using printf()

I want to store the output of a function (matrix_output_printf()) printing the following output (a matrix): 0 1 2 1 2 3 2 3 4 I would like to save this output in a text file. In ...
ecjb's user avatar
  • 5,361
0 votes
2 answers
62 views

Write the output of a function having many printf() statement in a text file

I have a function which writes a matrix using the printf() function. Is there a way to capture all the output of the matrix_output() function without having to each time re-open the file and append ...
ecjb's user avatar
  • 5,361
0 votes
0 answers
76 views

Writing file with <fstream>/FILE in C/C++

I am a bit perplexed by the way FILE/fstream systems described in C/C++. For instance, I want to write a file which I know the size of beforehand, just like any image (for instance tga with 18 bytes ...
Jurby's user avatar
  • 67
1 vote
1 answer
511 views

Pushing characters back to stdin in C

Say input stream (stdin) has "abc" on it. I want to push back, say, 3 '*' chars to stdin to get something like "***abc". I was trying to use ungetc() (I did ungetc('*', stdin)) for ...
StaticESC's user avatar
0 votes
1 answer
66 views

C: writing content of array to txt file

im trying to implement the number guessing game. The game itself works fine. But now I want to add a function which safes the score of the last game (Number of trys and guessed number) in the ...
Enno Mühlbauer's user avatar
1 vote
1 answer
337 views

Read stdin with line break in C

I am very new to C and I am trying to read a stdin with line breaks. A text file will be used as a stream. from what I have learned so far, I am trying this (when running the code, < text.txt is ...
vrivn3's user avatar
  • 23
0 votes
1 answer
543 views

How to stream Apache Arrow RecordBatches in C?

I read some data from a PostgreSQL database, convert it into RecordBatches and try to send the data to a client. But I fail to properly understand the usage of Apache Arrow C/GLib. My information ...
Hyrikan's user avatar
  • 99
1 vote
1 answer
183 views

fread like functionality for reading from an arbitrary stream

I am creating a library which parses a binary file format. There are two functions: void* read_buf(const void* buf, size_t size); void* read(const char* filename); In my read method I plan to read a ...
demberto's user avatar
  • 510
2 votes
2 answers
101 views

How to take unknown number of string from file in C?

I have a struct storing persons' names, surnames and salaries, but the number of their names is random. For example: list.txt John Smith Green 1000 //He has two names Jennifer Wilson 2000 //She has ...
zogac's user avatar
  • 89

15 30 50 per page
1
2 3 4 5
20