Questions tagged as 'c'

1
answer

Get the path of a file inside the project in the form of a string

I am using a method that in its parameters I inform a path of an image, Example: Meu_Metodo("image\test.png"); But this image is within Resources , as you can see in this image: WhatdoIdotogetthepathofthisimagewithinmyresources"in...
asked by 26.07.2017 / 17:23
2
answers

Problems with debugging in visual studio 2015 in C language

I made this program: #include <stdio.h> int main() { printf("Aula de C.\n"); return 0; } When I load ctrl + f5 or f5 I wait for the terminal to open and stay static to show me the program result. What happens is the termina...
asked by 31.07.2017 / 19:05
1
answer

How to replace / optimize multiple ifs in C?

I'm a beginner in C language, I'm doing an activity that is to enroll students and averages in a double-chained list, everything is working, but I believe I'm using too many ifs, is there any way to do these conditions without using as many ifs?...
asked by 16.07.2017 / 05:59
2
answers

Is it possible to view all the contents of a namespace in C ++?

When you make the policy: using namespace std; //primeira forma You get direct access to all elements of the std namespace. But suppose you want to use only std::cout or std::endl so it would be better to use the policy: u...
asked by 15.07.2017 / 19:17
1
answer

Open, read and write csv

I have a C code that is using the base structure for reading. Read FILE *input; input=fopen(argv[1],"r"); points=(Point*)malloc(sizeof(Point)*num_points); readPoints(input,points,num_points); fclose(input); Save FILE* output=fopen(...
asked by 13.07.2017 / 21:44
1
answer

Definition of Macros with C Indexing

Good afternoon, I would like to know if in C you have to do the following macro definition: #define EXEMPLO(1) a * c + b #define EXEMPLO(2) a + b + c #define EXEMPLO(3) b * c + a And then use indexing in some code for example for (x=1,...
asked by 12.07.2017 / 20:48
2
answers

Retrieve struct data in C

How do I save a Struct to a C file and retrieve this data in another program's execution?     
asked by 12.07.2017 / 16:04
1
answer

Intersection between segments of straight lines

I would like some algorithm that I could get from the slope of the semi-circles and their extreme points, to know if they are competing or not.     
asked by 02.07.2017 / 17:25
1
answer

Delete record in text file

I'm doing a program that consists of recording movies / series, modifying information, and deleting specified records. I'm having a hard time designing the delete and modify > First, it follows the definition of the structures of fil...
asked by 03.07.2017 / 06:14
0
answers

"Member access within misaligned address" with a linked list

I'm solving a leetcode problem (add two numbers that are inverted, each digit in a linked list node and return a linked list in response). When I give submit in response I get the following error: "Runtime error: member access within misaligne...
asked by 23.07.2017 / 19:17