Questions tagged as 'arquivo'

1
answer

Read text file and store fields in variables

I need help with the following: I will make a b-tree to present a job in college, which consists of reading the data from a text file and passing it to the B tree. I will do it as follows: I created a struct with the data types (Batch, Plate, UF...
asked by 30.06.2018 / 01:18
3
answers

Struct Strings Read with scanf Giving Wrong

Good luck, I'm developing a C code that performs data registration on files. However, I have a problem with the registerCustom function, which you will see below between the codes. Client struct: typedef struct { int idCliente;...
asked by 29.05.2018 / 02:10
1
answer

How to create file at runtime?

In my application, I need to convert a string that contains XML to RTF . The way I found to accomplish such a task is with the following code, which uses files instead of strings. So I would need to create a XLT , XSLT , RTF format file d...
asked by 09.05.2018 / 15:06
1
answer

Why did I have to use freopen in this case?

I have the following code: #include <stdio.h> int main(void){ FILE *ptr_file; ptr_file=fopen("archive.txt", "r"); short size=0; char c; while(!feof(ptr_file)){ c=getc(ptr_file); if(c=='\n'){...
asked by 10.04.2018 / 02:30
1
answer

Create file without knowing directory? Python

It is known that it is possible to create a new file through Python through file_create = open(r'C:\Diretório\Diretório...\FileName', 'w') . However, it is necessary to indicate where this file will be created on the computer. If we wan...
asked by 09.04.2018 / 19:41
1
answer

Doubt with excel files

I have a list of dates in a BTH.cvs excel file. I want to copy the whole file to another new.cvs, however the a.exe stops working. #include <stdio.h> #include <stdlib.h> int main(int argc,char **argv){ FILE *in = fopen("BTH.cs...
asked by 08.03.2018 / 21:50
1
answer

Appear Extension icon according to file extension (doc, xls, pdf)

I'm having a demand for a php system. I am listing documents from a certain directory that is on the server in my html page <div class="tab-pane" id="docs"> <div class="table-responsive">...
asked by 01.01.2018 / 23:15
3
answers

Obtaining a binary file and saving it again

I am doing a test with a simple code, but this one is giving error. I want to simply get the contents of a binary file which is an image (jpg), and save it again with another name. My code is this: String content = null; FileInputS...
asked by 02.12.2017 / 13:06
2
answers

Import / embed other files - go (golang)

I'm studying go (golang) and I have a question about importing files, the doubt is about something "elemental" but I could not find anything specifically about it. I have a package ( test ) arranged like this: test -> main.go ->...
asked by 30.10.2017 / 03:36
1
answer

Adapt txt file reader

I was using a manual method to grab a txt file, where the user typed the file name and extension and pressed the button, now they replace it with a code that opens a search box to choose the file in hd. JFileChooser fileChooser = new JFileChoo...
asked by 04.10.2017 / 17:58