Well, I have the following error:
Incompatible types when assigning to type 'char [30]' from type 'char *'
The code is as follows:
int main()
{
char *resultado[30];
float valor = 12735.98;
resultado=monet(valor); \O AVIS...
I can not assign value to a variable of a pointer of struct within a struct .
My structs :
typedef struct notas{
float geral;
float especifica;
}Notas;
typedef struct data{
int dia,mes,ano;
}Data;
typedef st...
I have this function that retrieves a record of a binary file already filled with records - such records are structured as node - and returns it to the program.
However, in the return from "i" to the main program variable "test", the two being...
I am trying to assign 3 names to a string vector within a struct, and using pointers to reference the dynamically allocated struct, and then print and reverse it in a repeat structure, but when trying to print it it is not returned nothing....
I should solve the following problem by creating a function for reading, one for calculation and use pointers.
#include<stdio.h>#include<stdlib.h>#include<math.h>structponto{intx;inty;}ponto1,ponto2;structponto*p1,*p2;p1=&a...
I wanted to know why you are causing the error:
Error converting 'int' to 'int *'
This program is only for training the use of pointers in parameters.
void teste(int *t){
*t = 50;
}
int main(){
int x = 10;
cout << "Sem u...
I'm doing this exercise in C, but I caught that part of passing pointer parameters.
Basically the program below adds the portion of real numbers and integers.
The problem is that the current results are:
a = 12 (correct!)
b = 10 (...
I want to print the "attribute" name of a struct of type "Person", however the printf returns (null) but I declare the name of the struct.
Here is the code below:
typedef struct pessoa{
char *nome;
struct pessoa *pai;
struct pessoa *mae...
I'm having a non-boot error, and I can not figure out why:
#include <stdio.h>
int main(){
const int LENGTH = 10;
const int WIDTH = 5;
const char NEWLINE = "\n";
int area;
area = LENGHT * WIDTH;
printf("Value of area : %d", ar...
The question is this:
Construct a function that takes two integer values a and b , return (passing by reference) the quotient, div, and the remainder division, mod, from a to b . The function should return -1...