Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Commit

Permalink
fix: Hilos no existentes de la clase Punto
Browse files Browse the repository at this point in the history
La clase thread no existe dentro del espacio de nombres std.
  • Loading branch information
Mandroide committed Sep 22, 2017
1 parent b4b969e commit 940e50c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
18 changes: 3 additions & 15 deletions Punto.cpp
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/*
* File: Punto.cpp
* Author: Aybar
*
* Created on September 14, 2017, 1:14 PM
*/

#include "Punto.h"
#include <fstream>
#include <stdexcept>
#include <string>
#include <thread>
using std::fstream;
using std::string;
using std::thread;
Punto::Punto() {
abscisa = 0;
ordenada = 0;
persist = std::vector<Punto>();
try {
thread t(&Punto::leer, this);
t.join();
leer();
} catch (string) {

}
Expand All @@ -49,16 +39,14 @@ Punto Punto::buscar(const unsigned x) {

bool Punto::alta(const int x, const int y) {
persist.push_back(Punto(x, y));
thread t(&Punto::grabar, this);
t.join();
grabar();
return true;

}

bool Punto::baja(const unsigned pos) {
persist.erase(persist.begin() + pos);
thread t(&Punto::grabar, this);
t.join();
grabar();
return true;

}
Expand Down
6 changes: 0 additions & 6 deletions Punto.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/*
* File: Punto.h
* Author: Aybar
Expand Down
11 changes: 2 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

/*
* File: main.cpp
* Author: aybar
*
* Created on September 14, 2017, 4:59 PM
*/

#include <iostream>
#include <map> // Para coleccionar menu.
#include <fstream> // Para archivo punto.txt.
#include <string>
#include <cctype>
#include <limits> // toupper();
#include <cctype> // toupper();
#include <limits> // Valida entrada por teclado.
#include "Punto.h"
//-------------------------
using std::cout;
Expand Down

0 comments on commit 940e50c

Please sign in to comment.