Questions tagged as 'c++'

1
answer

Help with error in Visual C ++ 2010

Good afternoon, someone could help me with the following problem in my c ++ code. 1> Generating Code... 1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(54): warning RC4011: identifier truncated to '_CRT_SECURE_...
asked by 19.11.2017 / 21:27
2
answers

How do I manage to run my random program? I can not identify the error

#include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { char *v[3] = {"piedra", "Papel", "tijeras"}; int ju, pc, jugados = 1, ganados = 0, perdidos = 0; randomize(); do...
asked by 16.11.2017 / 05:56
1
answer

Capture Ctrl + Key in Qt

This is my scenario: A MainWindow with a single central widget that is a QTabWidget , plus its QToolBar . Each time I open a new document, an instance of a class that contains two QTabWidget and% QTableView is in...
asked by 10.11.2017 / 11:09
1
answer

Convert CImg image to cv :: Mat

I am using the CImg 2.1.3 library with OpenCV 3.3.0 so I need to convert a CImg object to Mat, in the examples of the libraría they use this code: cimg_library::CImg<unsigned char> *cvImgToCImg(cv::Mat &cvImg) { cimg_library::CIm...
asked by 06.11.2017 / 16:29
1
answer

Error installing C in Eclipse

I am downloading C for eclipse (cygwin) and I have done everything that comes in this video to import everything necessary ( link ) and when doing the make, (control + B) I skipped this error in the console. Can someone help me? 20:42:54 ****...
asked by 26.10.2017 / 20:48
1
answer

QByteArray in 2 parts?

Good afternoon, I'm doing an exercise that involves Serial Port, send and receive a chain, when sending the chain all right, but when I receive it I get it in 2 parts, both devices have the same configuration. PuertoAP->setBaudRate(QSerialP...
asked by 05.10.2017 / 19:46
1
answer

Error encrypting with affinity algorithm

I am using afin encryption with its formula int main(){ char p[100]; char alf[]="abcdefghijklmnopqrstuvwxyz"; int a, b; printf("ingrese la palabra "); gets(p); printf("ingrese la constante de decimacion "); scanf("%i",&a); prin...
asked by 24.10.2017 / 05:20
1
answer

Alternative to kbhit

I am practicing with a "video game" creation course and use the kbhit function of the conio library. I have considered if there is any way to avoid using that library and use some alternative or equivalence.     
asked by 24.10.2017 / 06:28
1
answer

Question about the declaration of strings as data types in functions

main.cpp #include <iostream> #include <fstream> #include <cstdlib> #include "Cliente.h" using namespace std; int main() { ofstream creditoSalida("credito.dat", ios:: binary); if(!creditoSalida){ cerr << " No se p...
asked by 30.08.2017 / 23:53
1
answer

Error "was not declared in the scope"

This error comes to me in the first line;    "Something was not declared in this scope". I know it's a very basic error, but I'm not realizing what I'm failing and why. This is my code: void funcion(Algo x){ x.b= 1 ; } int main(...
asked by 02.09.2017 / 03:10