Questions tagged as 'c++'

1
answer

Error writing text file: can not convert std :: string to const char *

I am not able to write a string in file .txt in C ++ (CodeBlocks). // aux é um inteiro // aux2 é uma string // foi dado fopen no arquivo...abaixo só segue a parte com erro aux = x.retorne_energia(); aux2 = x.retorna_nome(); fprint...
asked by 12.06.2014 / 00:00
0
answers

Monte Carlo methods in C ++

This is the code I created to calculate in C ++ using Monte Carlo methods, the average distance between the points evenly distributed in a cube. I do not understand why in the output file "distance_media_when_to_the_number_of_configurations.txt"...
asked by 28.10.2018 / 03:21
0
answers

LEATHER LED - ARDUINO [closed]

Hello, I am a student of electrical engineering and I need to create a code that updates the reference values to light 3 different leds in all possible combinations, the programming language is for arduino. I need to implement a function that up...
asked by 22.08.2018 / 16:38
1
answer

Problem with a string attribute of an object

Hello! I'm having a problem with a string member of my object. When I do the assignment object.word="some word", the program even compiles and runs, but when I print the content, totally different symbols appear. Here is the code main: #...
asked by 13.08.2018 / 13:33
4
answers

What are files with .cpp and .h extension?

What are these files with extensions .cpp and .h ? How do they interact?     
asked by 26.09.2017 / 14:47
0
answers

Activating cgi bin web module c ++

Personal I installed cgicc in order to understand how CGI works however I've enabled the include mod_cgi of my apache2 in slackware but when creating a cgi and put it in / var / www / cgi-bin the same just downloads the cgi file that is inside t...
asked by 05.01.2018 / 08:37
0
answers

Help with bicubic interpolation algorithm

I'm trying to implement the bicubic interpolation algorithm but I'm having a lot of difficulty with interpolated values (it's not related to taking the values of the original matrix, but the relationship of the weights of distances). Followin...
asked by 09.01.2018 / 01:25
1
answer

Retrieve arguments passed via ARGV in the terminal

I have a make file. Inside this make file, I call this file that has this: set -f; echo $1 | bc I want to retrieve the value of the function in C for this makefile. Example: ./a.out "12 + 12" result: 24     
asked by 11.11.2017 / 08:39
1
answer

Open Dynamics Engine does not recognize collision between cylinders

I am using the ODE (Open Dynamics Engine) library to simulate physics in my application. To create the bounding box and cylinder geometry I am using the following code dMass m1; dMassSetZero(&m1); dMassSetCappedCylinderTotal(&m1, mas...
asked by 23.04.2018 / 19:12
0
answers

Error compiling a .cpp file using MinGW

Today I reinstalled MinGW and setup it again, tested it several times with some programs in c ++ and was working fine, but now I try to create new programs and when I will compile using the command: g++ -o file file.cpp It accuses the follo...
asked by 27.05.2018 / 23:41