Questions tagged as 'c'

2
answers

How to delete the last line of a text file in the C language

Well, I'm wondering how I should delete the last line of a file using the C language. Could anyone help me please. Below, follow my code. int quantidadeDeUsuarios = 0; Usuario *_usuario; void sair() { free(_usuario); } void removerU...
asked by 25.02.2017 / 21:10
1
answer

Problem in triangle verification in C

The program aims to identify whether a triangle is equilateral, isosceles or scalene. But there is an error in the isosceles identification line, where if the user places values of equal entries on the first two sides and different in the last,...
asked by 21.02.2017 / 17:35
1
answer

How to create a child process to an existing process in windows - C / C ++

I need to call via CreateProcess () or another windows function a process and bind to an existing process, is it possible? Thank you!     
asked by 14.02.2017 / 14:55
0
answers

File Encryption Error

Hello, I'm having a file encoding problem with my program I did in C. It's writing in a format full of special characters being that before I was not writing this way. The Program is a Numerical Turing Machine being written in the file are the tr...
asked by 14.02.2017 / 14:38
0
answers

How to edit the Full Path property of the file in Visual Studio

I added an existing file to my project. With that, it fixes the Full Path of my file, and I can not change it any more. What I need to do is to edit this value by using variables like $(SolutionDir) , so that the project compiles indepe...
asked by 23.02.2017 / 21:23
1
answer

Error passing a structure by reference in C [closed]

I'm learning C. However, I had a problem passing a structure to a function. I can not figure out what the error is. I will be grateful if anyone helps me. Me Sorry for the bad documentation. However, the code is very simple. #include<std...
asked by 26.01.2017 / 07:45
1
answer

Run-time error in C [closed]

Well, it's compiling everything ok, however, when I'm going to print the elements of the entire array tab [8] [8], which is a member of the lady structure, the compiler is somehow assigning numbers to this array, the which I do not know where th...
asked by 29.01.2017 / 08:38
4
answers

Mathematical division needs

On the Windows calculator: 9 / 3,0001 = 2,999 ... In my program: 9 / 3,0001 = 3; I would like to get this level of precision using C. See excerpts from my program: double op(double num1, double num2, char c) { if(c == '/')...
asked by 25.10.2014 / 18:23
1
answer

Libraries ntddk.h and wdf.h ... can you tell me its utility in this code?

#include <ntddk.h> #include <wdf.h> DRIVER_INITIALIZE DriverEntry; EVT_WDF_DRIVER_DEVICE_ADD KmdfHelloWorldEvtDeviceAdd; NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath) { NTSTATUS status...
asked by 04.02.2017 / 03:59
1
answer

How to increment the index of an unlimited array?

How can I increment an array within a structure? My structure is this: struct list { char name[50]; int products_list[]; } LIST[10]; I wanted to know the current number of elements in the array (list_products) to add more products with t...
asked by 01.01.2017 / 23:03