Questions tagged as 'c'

2
answers

Matrix segmentation failure

I'm getting the segmentation fault error in the code below: #include <stdio.h> #include <stdlib.h> #define linha 1000 #define coluna 1000 int main() { long double M1[1000][1000]; long double M2[1000][1000]; long double ma...
asked by 24.09.2016 / 22:26
1
answer

Error in conversion from infographic notation to postfix

By inserting (3 + 7) the result of the operation is 37+ and by putting only 3 + 7 without the relatives of the segmentation error and when I put (3 + 7) - (2 + 7) I'm finding the mistake. I would like a little help. #include <stdio.h> #i...
asked by 25.09.2016 / 22:28
2
answers

String reading with two or more names

How do I read a string with a compound name for example: "Vitor Martins"? I'm doing this program that stores a student's name and grade, but it gives a bug when entering two names. #include<stdio.h> #include<string.h>...
asked by 24.09.2016 / 15:58
1
answer

Errors compiling program using MySql resources [closed]

I'm learning how to use MySql , but I had some problems compiling a program in C using MySql . Here are the errors below: gcc: error: Usage:: No such file or directory gcc: error: [OPTIONS]: No such file or directory gcc: error: Options:: No...
asked by 05.09.2016 / 22:53
1
answer

How to split a sprintf string into multiple lines in C?

I have a string in sprintf and I would like to split it into multiple lines as it gets big and the code gets messed up. sprintf(srt,"GET %s HTTP/1.1\r\nAccept: text/javascript\r\nUser-Agent: Custom HTTP User Agent\r\nHost: %s\r\nConnect...
asked by 04.09.2016 / 05:40
1
answer

Problem reading file

I am writing a code in C ++ and need to read a distance file that was calculated in another algorithm done in C . This file looks something like this: 100 \ n (natural number) 0.0000 58.25646 7.1556 5.1564 0.0000 44.00000 ... - > an...
asked by 30.09.2016 / 03:14
2
answers

Linking problem in project with more than one source file

This is my job. Give me an error when I call the main function. This is the header of my function, in the file function1.h int eleminar_numeros_repetidos(int *vec, int n, int *vec1); File function1.c: void organizar_vetor(int *vec, in...
asked by 01.10.2016 / 22:53
1
answer

Why does the code generate garbage at the beginning of the vector?

The following code generates an unexpected result, at the end of the loop the first positions of the vector are with garbage stored, does anyone know why this is happening, and where is the error? OBS. The code has the same behavior in both C...
asked by 29.09.2016 / 18:13
1
answer

Print multiple arrays separately

I would like to know if you can print these three arrays without having to create multiple for's , their printing on the screen should be separated. (I need an alternative because I have little space and the code was very extensive when I...
asked by 03.10.2016 / 04:47
1
answer

how to solve "SIGSEGV" error when using 'strcpy'

Hello, I'm experiencing a "SIGSEGV" error on the following line: strcpy(buffer_ReceiveAutomation, ls_buffer_PPouAUT);
asked by 22.07.2016 / 19:07