Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jorgmen

@Jorgmen
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • NON-SCALAR TYPE CONVERSION!?
    J Jorgmen

    Thaks for your replays: now i have a new q?

    struct Miembro{
    int id;
    int activo;
    int pass;

    Miembro(int a, int b, int c)
    {
    id = a;
    activo = b;
    pass = c;
    }
    };

    struct NodoMiembro{
    NodoMiembro * nextmiem;
    NodoMiembro * prevmiem;
    Miembro persona;

    NodoMiembro(Miembro nuevo){
    nextmiem = prevmiem = NULL;
    persona = nuevo;
    }
    };

    struct ListaMiembros{
    NodoMiembro * lastmember;
    NodoMiembro * firstmember;

    ListaMiembros(){
    lastmember = firstmember = NULL;

    }

    I can't compile this, I'm having headache because of c++: it says: 4 0 F:\main.cpp In file included from main.cpp F:\structs.h In constructor 'NodoMiembro::NodoMiembro(Miembro)': 31 27 F:\structs.h [Error] no matching function for call to 'Miembro::Miembro()' 31 27 F:\structs.h [Error] candidates are: 17 1 F:\structs.h Miembro::Miembro(int, int, int) 17 1 F:\structs.h candidate expects 3 arguments, 0 provided 12 8 F:\structs.h Miembro::Miembro(const Miembro&) 12 8 F:\structs.h candidate expects 1 argument, 0 provided F:\structs.h At global scope: WHY NodoMiembro can't have a "Miembro xxx" as parameter in the constructor???

    C / C++ / MFC c++ sysadmin help question lounge

  • NON-SCALAR TYPE CONVERSION!?
    J Jorgmen

    Sorry you all for bothering on Sunday: I'm new using C++ and I need to simulate a Social network, but I'm having troubles doing a "member": this is the code is very simple: I hava a header called "structs.h"

    struct Miembro{
    int id;
    int activo;
    int pass;

    Miembro(int a, int b, int c)
    {
    id = a;
    activo = b;
    pass = c;
    }
    };

    //******************************
    //Main is like:

    #include #include #include #include "structs.h"

    using namespace std;

    int main(void)
    {

    cout<< "hola";

    string nombre;
    nombre = "Jorge";
    cout <<" "<< nombre << endl;

    Miembro memb = new Miembro(1, 1, 123);

    // system("pause");
    // return 0;
    }

    F:\main.cpp In function 'int main()': 17 37 F:\main.cpp [Error] conversion from 'Miembro*' to non-scalar type 'Miembro' requested F:\Makefile.win [Error] [main.o] Error 1 (if this is the only error: please check your library includes)

    jorgmen

    C / C++ / MFC c++ sysadmin help question lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups