Questions tagged as 'c++'

0
answers

Dijkstr finds no other way

I'm implementing the dijkstra algorithm to find the smallest path on a network. Starting from a source node s, I need to calculate the smallest path to reach all the other nodes that exist on the network. But the algorithm is not working properl...
asked by 01.11.2018 / 01:39
1
answer

Struct with union is giving invalid use error

I need to use union within struct , but I can not. The error displayed is    [Error] invalid use of 'union Client :: document' Struct: struct Cliente{ string nome, email; union documento{ long cpf...
asked by 18.11.2018 / 14:18
0
answers

I can not add a single variable on a stack and draw it

I'm trying to make a program that makes a stack of objects using lib stack and then draw what's on top, to do some testing I was doing the following: int main() { RenderWindow wind(VideoMode(VideoMode::getDesktopMode().width, VideoMode:...
asked by 21.11.2018 / 23:23
0
answers

Attempting to read a .txt file

Well I'm trying to read from a .txt file, but when I try to read and by in variables it's giving me the whole wrong info, now wrong places. I've tried using Debug's tool but I can not figure out why ... Here is the .txt file: 15 29 1;10...
asked by 01.11.2018 / 22:31
1
answer

Static member error in Singleton implementation

When implementing the Singleton pattern the compiler gives the following error:    include \ graphdata.h | 21 | error: 'constexpr' needed for in-class initialization of static data member 'graphdata * graphdata :: instance' of non-integral ty...
asked by 05.10.2018 / 16:20
0
answers

Pass start and end of a vector to the sort function using c ++ method overload

I want to access using overload using node which is an object of the base class method getInicioVetor and getFimVetor within the child class, I wonder if there is a way to do this? I tried it just that it did not work. static boo...
asked by 26.09.2018 / 03:58
1
answer

What is a linker for?

Some languages use a linker or Wikitravel as it is also called. What is its function and relationship to the compiler? Why do some languages do not have a linker ?     
asked by 21.03.2017 / 16:01
0
answers

DWORD conversion

Hello, I have the following code snippet #include <windows.h> #include <d3d8.h> #include <d3dx8.h> #pragma comment(lib, "d3d8.lib") #pragma comment(lib, "d3dx8.lib") typedef HRESULT(WINAPI* CreateDevice_Prototype) (L...
asked by 15.11.2018 / 18:22
0
answers

how to open socket for a specific network on a machine with 2 networks [closed]

I have a machine with 2 network cards. How do I open a socket for a specific network?     
asked by 06.09.2018 / 14:45
1
answer

Error: expected class-name before

I'm developing a project where I have an online class that inherits from an X class, where this X class needs to give a new in an online class object. When I do this happens the error, due to the inheritance I believe:    expected clas...
asked by 08.10.2018 / 03:11