Questions tagged as 'c++'

2
answers

Implement C # style flags in C ++

I am adapting the maze generator algorithm written in C # to C ++. I have found a new theme for me: Flags I know how to implement enumerators in c ++, it's practically the same, but I do not understand how to implement the flags. In co...
asked by 04.03.2017 / 18:17
1
answer

Error reading string with gets ();

I have problems reading a string in c ++. Since the strings do not have a character limit (they are dynamic), I thought I would read them with gets in the following way: #include<iostream> #include<cstdio> using namespace std;...
asked by 15.10.2017 / 02:39
1
answer

Error compiling in c ++

The error in compiling is '' undefined reference to 'calculateArea ()' ''    It is in cpp format and edited with codeblocks. #include <iostream> #include <cmath> using namespace std; int calcularArea(); int main() { float lado1...
asked by 21.10.2017 / 22:51
1
answer

Queue without duplicate entries

I am trying to implement a queue so that repeated objects can not be inserted. I have this implementation that I found but it gives me an error: std::queue<punto> q; std::set<std::reference_wrapper<punto>> s; // t...
asked by 20.04.2018 / 14:10
1
answer

C ++ Class Prototype

Hello, I have a problem: include <iostream> using namespace class varios; int main() { cuerpo.hola(); cin.get(); return 0; } class varios { public: void hola(); }cuerpo; void class::hola() { cout<<"Este es un...
asked by 03.01.2017 / 23:20
2
answers

Is there a default constructor with no variable that needs to redefine the child classes in C ++?

When compiling a program, I have a curious error: MaxSize.cpp: In constructor ‘MaxSize::MaxSize(int)’: MaxSize.cpp:7:26: error: no matching function for call to ‘TasMin::TasMin()’ MaxSize::MaxSize(int size){ In file included from MaxSize.h:1:...
asked by 25.04.2017 / 17:59
1
answer

syntax error near unexpected token 'while'

Programa que calcula el promedio de goles de un jugador por partido made by Bolanos Alfaro Jaime Sebastian include<stdio.h>//para los comandos printf, scanf y getchar int main(int argc, char *argv[ ]) {//abre funcion principal...
asked by 13.04.2017 / 01:00
1
answer

C ++ Initialization of an arrangement of structures

this is my code: struct objeto { string etiqueta; string tipo; string descripcion; int codigo; int cantidad; bool existe; } articulo[21]= //Obviamente todos tendran datos diferentes { articulo[0]={"Atlas Humano","Li...
asked by 18.02.2017 / 23:32
1
answer

C ++ Unknown error, I have no idea what happens

The goal is to format the date correctly, but I need to use that method in the constructor. #include <cstdlib> #include <iostream> #include "fecha.h" using namespace std; class Fecha { public: Fecha(); Fec...
asked by 29.08.2016 / 08:17
1
answer

I could tell the difference between direct and sequential files in C ++

What is the difference between direct and sequential files? If you can give me an example of each one with the syntax that they carry in C ++ please.     
asked by 11.05.2016 / 22:47