Questions tagged as 'c'

1
answer

Error in passing a structure by reference C

In this exercise it is necessary to change only the characters a through b, ie printf output should be like this {B, 1.5, 2.7} {A, 3.9, 4.2} typedef struct{char n;float x;float y;}Ponto; void troca_nomes(Ponto *a, Ponto *b){ char aux;...
asked by 11.11.2018 / 21:43
1
answer

Problem with strcpy [duplicate]

I'm trying to fill in the fields of a struct with strcpy but I'm not getting the expected value, such as: #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> struct Aluno {...
asked by 28.10.2018 / 20:59
1
answer

manipulation of any one struct

I have a struct, how do I predefine data in this struct? example define life of struct 100? I've tried dataplyer.vida = 100; struct dataplayer { int vida; int armadura; int arma; int level; };     
asked by 05.01.2019 / 05:10
1
answer

When splitting project into multiple headers the error occurs: dereferencing pointer to incomplete type

I was wondering how to split a project into multiple files. I had created a project divided into 3 files first, a main.c (containing main function), a lib.c (implementation of the functions used in main.c) and a lib.h (contains function prototyp...
asked by 20.10.2016 / 21:04
1
answer

Find strings within * .txt files in C

I'm a beginner and I'm trying to make a program and C ++ that requires two functions. 1) Search in a * .txt file for a specific string; 2) By some kind of index indicate the position of this string within the file. To try to explain bet...
asked by 20.12.2016 / 02:37
1
answer

leaves the test alone

When I type the second option it will only go until the car brand does not enter the year and does not give any compilation errors whatsoever #include<stdio.h> #include<stdlib.h> #include<conio.h> #include <string.h> m...
asked by 23.11.2018 / 17:08
1
answer

Two-Dimensional Matrix Matrix Problems

My goal in this exercise is that in each loop to make a new snack request, the reported data is appended to the final table (array [i] [j]). In the second "for" is where I try to assign the variables [int cod] [char snack] [int price] into the a...
asked by 05.09.2018 / 21:37
1
answer

Can anyone help me to fix the problem?

   Action       Get two integers from the user, the first being the digit you want to know how many times it appears and the second being the contact number.       Input and Output       Entry:       Integer value A (between 1 and 9).   In...
asked by 15.09.2018 / 00:33
1
answer

How to check if the limit of a vector has not been exceeded?

Good afternoon, gentlemen! I am doing a college job that asks you to create a schedule. I've done most of the code, but I can not see the light so when the user tries to register a person in the calendar, show whether the calendar is already...
asked by 20.09.2018 / 19:59
1
answer

Error No Code Unity5

I'mhavingtwoerrors,Icannotfixit.     
asked by 19.05.2016 / 16:05