Questions tagged as 'arquivo'

1
answer

How to load only one line and modify it

I want to modify only one line of a file, something like this with open('arquivo.txt', 'r+') as f: for line in f.readlines(): if line == algumacoisa: line.write('textoaqui'); break f.close() I sa...
asked by 10.02.2018 / 18:28
2
answers

Invalid characters in the path in File.Move ()

I have this code to move a file: string path = "C:\inetpub\beGoodToo\videofolder\nome.mp4"; string path2 = "\"C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.7.3\content\videostreaming\nome.mp4\""; // Garantir que exi...
asked by 19.12.2017 / 13:51
2
answers

Binary File Reading in C ++

Good morning. I'm trying to do a read of structs that I've inserted into a binary file, but it's giving error at the time of reading. Here is the code for the read function: void lerRegistros(char* file_name) { ifstream entrada;...
asked by 15.01.2018 / 18:40
1
answer

Convert file to Byte Array [duplicate]

I am trying to convert a received file in FileUpload (ASP.NET tool) to an array and then the array to a string . But when trying to use Encoding Visual Studio accuses an error saying that this class only accepts a string...
asked by 27.11.2017 / 15:44
1
answer

How to read TXT to a certain point and then continue from that point?

I have a class that is responsible for reading a TXT file part by piece and returning a result according to that part. This result will be used by another class. That is, I open the txt read until a certain part and make a return to another c...
asked by 20.11.2017 / 12:38
1
answer

Put multiple classes in the same file

In my project I have the class main and created new Java class files with NetBeans to define the objects there. I can only use one of the classes with main , others can not even call the methods. Is it anyway? Can I only use%...
asked by 16.10.2017 / 23:29
1
answer

Catch all the images in a sub-directory, except for one folder

I'm getting all the photos from a directory and its subsequent ones, but I do not like the "Backup" folder, how could I do that? string[] Arquivos = Directory.GetFiles(PathEx, "*.*", SearchOption.AllDirectories); I was thinking of using...
asked by 03.12.2017 / 15:44
1
answer

Reading odd-numbered records only

Initially, I had to create a program to save the data of a struct to a file. The struct is as follows: typedef struct { char nome[30]; int matricula; char conceito; } TipoAluno; I made the program in a way that saved the data in...
asked by 22.08.2017 / 16:20
1
answer

Error reading file

I need to create functions that read from an input file.txt: Number of points Coordinates of the points Number of lines Number of vertices of each line Coordinates of each vertex of the line Number of polygons Number of ver...
asked by 01.07.2017 / 02:30
1
answer

Passing by reference, and saving data from a file to a vector

I'm having trouble saving the read data from a text file and a vector from a structure I created. My goal is to open a text file, grab the data that is saved in it, and save it to a vector of type INFO. My program compiles perfectly, but when...
asked by 20.08.2017 / 06:13