Questions tagged as 'c++'

1
answer

Difficulty with If / Else

Hello! It's OK? I'm having a problem when I run my program, it's a program to calculate four means and divide by four, and it's necessary to do this using If and Else, but when I execute, the program reads the first condition, and if the input o...
asked by 15.09.2018 / 23:48
1
answer

File location txt Android ndk / C ++

I made a c ++ code to create a file: Ialreadygavepermissioninthemanifesttoreadandwrite: My question is: Where does it save this file on my cell phone ???     
asked by 15.10.2017 / 18:31
1
answer

Program with 3 files

I made a code in c ++ that works if it's all inside main.cpp. When I create other files, such as a header it gives the undefined reference error. I've done everything and only managed to make it work with a single source file. Can you help me ?...
asked by 28.03.2017 / 22:58
2
answers

Count letter and pick up initials of name

The program does not print the first letter of each name. nome[i]=nome[i+1]; I need to make a program that enters the name of the person, say how many letters A has that person's name and say the first letter of their names, for exam...
asked by 22.11.2017 / 21:37
1
answer

Use of arrow keys to generate movement in game

I wanted to know how the developer of the Snake game in C ++ merged with C made the snake move from the keyboard arrows. I think the part it moves on is the time that compares tecla=='K' tecla=='H' and so on, but I wanted to know wh...
asked by 14.01.2017 / 06:00
1
answer

Error "Uninitialized local variable 'p' used

I am developing a program in c ++ to learn malloc , but it is giving local variable error in main function: // testeMalloc.cpp : define o ponto de entrada para o aplicativo do console. // #include "stdafx.h" #include <stdlib.h> #...
asked by 01.06.2018 / 22:10
1
answer

How to use strcpy and strcat in C ++?

How to use strcpy and strcat to get the names of the txt files in a directory within the application in a folder called value.     
asked by 26.05.2015 / 15:38
1
answer

Calculate distance between two points in C ++ using struct

I am having trouble printing the result, but before that it is not done because it is a new type created by struct it does not calculate since it asks for type double follow the code #include <iostream> using namespac...
asked by 18.03.2015 / 14:15
1
answer

How to pass data read in a program in c ++ like momando in cmd

I would like to know how to read something in a program and pass this reading as a command to cmd, through the stdlib or cstdlib library, whatever. The photo shows what I'm trying to do.     
asked by 11.02.2017 / 22:11
1
answer

How to avoid this error message? "Main.cpp: 8: 16: error: lvalue required as left operand of assignment" [closed]

I'm getting the error message: "main.cpp: In function 'int main ()': main.cpp: 8: 16: error: lvalue required as left operand of assignment    (-10)) / 76 = n-1; " In the code snippet below, does anyone know why? #include using namespace std...
asked by 23.05.2017 / 17:39