Questions tagged as 'dev-c++'

2
answers

Matrix as an attribute?

I am trying to create a board, with different dimensions, that is, 3 x 3, 4 x 4 and 5 x 5 The problem is that I do not know if the part of the attributes of my board class is well declared. Can you tell me if it's okay? On the other hand, I w...
asked by 15.10.2018 / 02:24
2
answers

Error dimensioning vectors in C ++

Greetings. It's my first time in forums, I'm learning C ++, and I have had a problem; I have to do a program that at first allows me to add student data to an arrangement. The problem is that it does not matter how many students you indica...
asked by 24.05.2017 / 20:09
5
answers

Add two conditions C?

What I'm trying to do is make a C program, that gives me the final grade of a subject and depending on the number, show me a message on screen. #include<stdio.h> #include<conio.h> main (){ float cal1=0, cal2=0, cal3=0, cal4=0...
asked by 31.10.2016 / 04:31
1
answer

How to solve the error undefined reference to '__imp_WSAStartup'

I thought how can I access web pages through a program in c ++? one thing led to the other and I found myself reading about Sockets on the microsoft page Creating a basic Winsock application and initializing Winsock . Well, put all the code...
asked by 19.03.2017 / 05:08
1
answer

Random number of 0 and 1 in C

I need to generate a random number of 0's and 1's in C. Try to make two variables with random numbers, that of 0's and 1's, and the other so that it is the limit of a cycle that is executed to generate those 0's and 1's. I hope someone can help...
asked by 13.09.2017 / 01:51
1
answer

I have an error "crosses initialization of 'player p3' when using the switch in C ++

#include<iostream> #include<string.h> using namespace std; class jugador{ char *nombre; float arg; char *equipo; int aux; public: jugador(char *, char *, float); ~jugador(); jugador(jugador...
asked by 21.09.2017 / 03:57
1
answer

Array of objects with the class 'vector'

I wanted to know how you could create an array of objects with the vector class and also call the constructor method of each vector object (array). What I have done so far is this: #include<iostream> #include<vector> using names...
asked by 16.06.2018 / 02:18
3
answers

Show current date and time in C ++

I am using Visual Studio 2015 and I want to show the "date" and the "current time" in C ++, for this I am calling the functions: getLocalTime and getTimeFormat. I have this code inside the main: printf(GetLocalTime); printf(GetTimeFormat);...
asked by 05.11.2016 / 17:21
1
answer

in the order of mathematical hierarchy gives me 410 and in the compilation of the code gives me 400 what should be the error?

#include <iostream> #include <conio.h> using namespace std; main() { double x = ( 4 * 5 * ( 7 + ( 9 * 3 / ( 2 ) ) ) ) ; cout<<"el resultado de x es: "<<x;// el resultado es 400 getch(); }     
asked by 22.11.2016 / 00:55
2
answers

Concatenate vectors with std :: vector in C ++

I wanted to know how you could concatenate two fixes in C ++: For example a = {1,2,3,4,5} b = {6,7,8,9,10} c = a + b //El resultado c = {1,2,3,4,5,6,7,8,9,10}     
asked by 24.06.2018 / 06:25