I am trying to receive several lines of input from the user (at most 37 chars each) and write them in a file, but the result is the creation of the file with nothing there.
My current code:
void escrever_para_ficheiro(FILE *fp){
char bu...
In PHP, we have a function called file which, when opening a file, causes each line to be placed in an item of a array .
Example:
hello.txt
olá
mundo
php script
file('hello.txt'); // array('olá', 'mundo')
I...
Creating the binary file:
#include <stdio.h>
int main(int argc, char const *argv[]) {
FILE *BIN;
BIN = fopen ("BIN.bin","wb");
if (BIN!=NULL)
{
for (int i = 1; i <= 100; i++) {
fwrite( & i,sizeof(i),1,BIN);...
I'm trying to write and read an integer in a binary file with the following code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct{
int free_slot;
}header;
void main(void){
FILE *fd = fopen("te...
Well, I'm taking a course in logic and the following question fell:
Develop a block diagram to check which products need to be purchased and the quantity to be purchased: Having the following information:
Product code (CODPRO), Mi...
I have a file with 7 million lines, but my code takes a maximum of 63000 and does not return any error.
Scanner sc2 = null;
try {
sc2 = new Scanner(new File("./assets/words.txt"));
} catch (FileNotFoundException e) {
e....
In a C # application, it can take from 1 to 2100 hours of data gathering. The data is saved in a CSV Excel spreadsheet every minute.
With the code below we can hide and show the file.
#region
string diret=saveFileDialog1.FileName;...
Is it possible to add other values to AppSettings without breaking with the application?
Default values:
<appSettings>
<add key="Nome" value="ValorTeste" />
</appSettings>
I would like to leave it like this...
I need to make a code that reads a text file (txt) and save only the words in the positions of a vetor , below my code follows:
int main(int argc, char** argv)
{
FILE *file;
file = fopen("arquivo.txt", "r");
char x[100];...