Questions tagged as 'c++'

1
answer

Operator overload in C ++

I'm learning operator overload. For this I am trying to overload the * operator so that it is interpreted as | object class string * variable type int = object class string concatenated with it so many times the type variable int. Probably there...
asked by 12.09.2017 / 04:49
1
answer

All possible paths in graphs

I'm doing a work that starts from it, it's all about finding all possible paths from one vertex to another vertex, so I'm using an algorithm almost identical to DFS as shown below: #include <iostream> #include <list> #include <a...
asked by 28.06.2017 / 02:50
1
answer

C ++: what does SIGSEGV mean?

I'm doing a dynamic numeric class, but when I go to test, I get the message "Program recived signal SIGSEGV" . I know this is a pointer error, but why does it occur and how do I fix it? typedef unsigned char uchar; typedef unsigned short usho...
asked by 25.07.2017 / 20:01
1
answer

Insertion in Tree B with a large numbers C / C ++

I need to build a Tree B that reads the name of the files in a folder and orders them. "Create a repository of images (100 images with 5 of each ex-category: trees, boat, dogs, houses, computers, flowers, cats, people, beach, plantations, etc.)...
asked by 26.04.2017 / 00:20
2
answers

Doubt in a simple CRYPTOGRAPHY program in c ++

I have a question to implement an encryption code. Follow the code below: #include <iostream> using namespace std; int main(int argc, char** argv) { string criptografar(string mensagem); string descriptografar(string mensagem);...
asked by 31.08.2017 / 18:56
1
answer

Algorithm for AST [duplicate]

I'm creating a programming language in C ++. I made a simple lexer, which works perfectly fine for now. out 5 + 7 * 3 My lexer turns this into: kw: out num: 5 op: + num: 7 op: * num: 3 nl Now I need to create an AST (abstract synt...
asked by 03.08.2017 / 23:09
1
answer

Python to C ++ conversion

I work on my course with C ++, and wanted to use a Python class variable access feature. Here's an example: class Telefone: nums = {} def __init__(self, numero): self.num = numero Telefone.nums[numero] = self p...
asked by 11.06.2017 / 20:30
1
answer

Vectors - Separate negatives and positives

I have to make a program that receives a vector of 8 numbers and returns 2 vectors, the first with the positive numbers of the 8-position vector, and the second with the negative numbers. The problem is that I do not know how to use VECTOR, s...
asked by 16.06.2017 / 05:01
1
answer

Error: argument of type char is incompatible with lpcwstr

#include <iostream> #include <Windows.h> #include <TlHelp32.h> DWORD getbaseadress(DWORD Pid, TCHAR* n); using namespace std; int main(int argc, char* argv[]) { HWND hwnd = 0; DWORD pid = 0; hwnd = FindWindow(0,"...
asked by 15.02.2017 / 21:39
3
answers

How to search in a String and replace X with a number and use the same to calculate?

I'm creating a program in C to do the Newtow-Raphson method, it should calculate automatically for the person. However in a part of the method the automatic substitution of values in the function as for example below should be done:    f (x)...
asked by 06.11.2016 / 04:19