Questions tagged as 'c'

2
answers

Problem with random values

Good evening, guys. I am solving an exercise where I must, at each execution, generate a random number and then turn it into letter. For this I made a function. It is almost all right, the number is generated and is transformed into letter...
asked by 15.04.2015 / 07:24
1
answer

Main for function on linked lists

I'm having trouble creating a main so I can test if my function is working well. My program is as follows: LInt fromArray (int v [], int N) which, given an array v with N elements, sorted in ascending order, builds an ordered list with array e...
asked by 15.05.2015 / 00:15
2
answers

Help with typing user

Hello, I'm doing a sort program in c but I'm having difficulties. How or where, and what I put for the user to enter the size of the array as well as its elements. I tried this way: #include <stdio.h> int main(){ int num[]; int ta...
asked by 14.05.2015 / 01:51
1
answer

Pass and return vector of type defined by struct as parameter of a function in C

I'm finding errors for the following code: #include<stdlib.h> #include<stdio.h> #include<stdbool.h> #include <locale.h> #define true 1 #define false 0 const int limite = 100; //Definição da estrutura Conjunto como um...
asked by 09.04.2015 / 11:51
2
answers

Can I put an array as a parameter of another array?

for(i=0; i<=203; i++){ array2[3][i]; array1[array2][2][string]; /*string corresponde a uma string ja definida e nao relevante para a questao*/ (...)     
asked by 04.12.2014 / 00:07
1
answer

Undeclared variable

You are giving error on lines 118, 127, 133, 139 ...    127 20 'vector' was not declared in this scope #include<stdio.h> #include <stdlib.h> #include <string.h> #define tamanho 5 int pos=0; struct agenda {...
asked by 06.12.2014 / 02:37
1
answer

How to allow the user to select a directory / folder using a FileChooserDialog?

Maybe you can add a directory filter to achieve this.     
asked by 24.11.2014 / 15:24
1
answer

Create function that returns random numbers in C

I need to create a function that returns random numbers without repeating between 2 ranges. I wanted to create a kind of a card game, where the cards are shuffled, and when they come back they never go out again. In my code you are repeati...
asked by 25.11.2014 / 20:04
1
answer

Dismantle full numeric expression in C

Hello; I have a code that must be done in C language, which is to receive a numeric expression, including the result of the same, for example: "20 + 30 = 50", which will be stored in a string. After receiving the expression, I want to dismember...
asked by 17.11.2014 / 15:10
2
answers

How to do a search in txt file?

How do I search a .txt file that contains, for example, a list of numbered names, type: 1 - João 2 - Maria ... I would enter the desired number and the return would be the name, or say nothing was found. It can be in C, or C ++.    ...
asked by 05.05.2015 / 16:02