Questions tagged as 'char'

1
answer

Char reading failed with scanf ("% c") [closed]

Check this code to register two random arrays and then add, multiply ... I want to put an option that every operation made the user has the option to exit the program, without going back to the initial menu, putting him to choose between 1 and 2...
asked by 13.10.2015 / 21:57
2
answers

Does not display the string, in C

I'm having trouble copying string in C, this does not want to work. #include <stdio.h> #include <stdlib.h> int main() { int count; char str1[20] = "Hello World", str2[20]; for(count = 0; str1[count]!='#include <stdi...
asked by 17.05.2015 / 19:28
1
answer

What does it mean (Char) 0 / (Char) 8 / (Char) 13?

I'm doing a shopping program and found it on that same site. The answer to a problem I had, but I did not understand what the (Char)0 part would be, among others. I need to explain what this is. private void preVenda_KeyPress(object sen...
asked by 25.11.2018 / 11:34
1
answer

How to resolve error in printing strings?

I'm passing a struct by reference to a function at the time of inserting the data, and again at the time of printing this data. But the "insert_element" function does not read the time float (it skips the reading), and the function "Print_dates"...
asked by 07.11.2018 / 12:15
1
answer

Compare a vector of char?

Good people I have the following doubt why I can not compare two vectors of type char using relational operators? I know that vectors are a compound type and that the characters are in a static area am I right? But what influences at the time...
asked by 21.04.2018 / 21:10
1
answer

Something equivalent to sstream library from C ++ to C

I need something similar to the stringstream that has in C language for C language, I need a lot of it because I want to perform querys on a database using C (C mysql connector). As I had no idea something like what I had in the sstream libra...
asked by 01.03.2018 / 02:39
1
answer

C ++ program hangs when I use a function to get the name of a file

I'm doing a small IDE in c ++ and I'm having trouble getting the name of a file. ex: the full path of the file is "keywords // cplusplus.txt" however the file name is "cplusplus.txt". So I wrote a function to get the real name. char* Io::GetRe...
asked by 08.01.2018 / 23:16
2
answers

How to test if a string is a number in the C language?

I'm a beginner in programming. I am performing an exercise in which I must determine whether a string is a number, whereas the user can write anything as input. Then I created the function below. I can only use the standard library. I'm tryin...
asked by 02.05.2017 / 11:52
1
answer

I can not compare char []

I'm running a server that I've done in C and it's working normally, with one exception: I can not create a condition for received bytes. The Write and Recv functions work normally but I'm falling into a silly error in which the Else clause is al...
asked by 23.03.2017 / 00:25
1
answer

Problem with scanf on% d receiving a keyboard letter

I have a problem, I am reading a int %d by scanf , but if the user types a letter the program enters loop . void chama_menu_switch(Fila **f, int n){ char confi; int i,y,x,a,z; double r; a = 0; int b; for (i = 0; z != 11; i++) {...
asked by 10.06.2016 / 02:53