I don't remember how to do this in C++:
#include <iostream>
#include <conio.h>
#include <string.h>
int main(){
char categorias[3][20];
/*char pais[3][20];
char movimiento[3][50];
char obras[100][50]; */
categorias[0]="Alta";
categorias[1]="Media";
categorias[2]="Baja";
}
This throws this error: 19 15 C:\Users\dell\Desktop\Subasta.cpp [Error] incompatible types in assignment of 'const char [5]' to 'char [20]';
Long time ago I don't use C++ and I can´t solve the problem.
std::stringinstead ofchar[]and your life will be much easier.std::array<std::string,3> categoriasinstead ofchar[3][20].Dev C++is an IDE and not a compiler. I assume you are using some version of mingw.main(){inc++you should not omit theintbeforemain.categorias[0]="Alta";c-strings are not assignable. Replacechar categorias[3][20];withstd::string categorias[3];and the assignment will work.