General C++ Programming - November 2018 (Page 3)

How to construct a sphere in enclosed surface.
 
Hello all , in my project , i need to develop a sphere inside the closed surface, i have a tessellated points on surface , in each point i need to calculate th...
[1 reply] : "to develop a sphere"? Like "to put a sphere inside"? "thickness on p... (by keskiverto)
error pointer operand
 
I get this error when I try compiling my code is there a way I can fix this. testings.cpp:69:48: error: indirection requires pointer operand ('List<ch...
[8 replies] Last: I redid the post n edited the code Please DON'T do that. It makes t... (by MikeyBoy)
Card Game
 
I was supposed to create a deck of cards ( done ) however while trying to make a game where the computer draws a cards and the user draws a card and whoever ha...
[2 replies] Last: Have a look at your textbook or ask google: https://www.google.com/sea... (by Thomas1965)
C++ constructor
 
I have to implement a constructor for a linked list directory(a directory implementation backed by a linked list) with private members 1)name(//the file name o...
[16 replies] Last: Post the exact error message and source file. .cpp implementation: ... (by coder777)
by bree
What am i doing wrong? URGENT
 
I am new at programming and i'm having a hard time with this. in the void function begin it says there is an error " 68:69: error: reference to type 'const st...
[2 replies] Last: And why all the horrible global variables? (by jlb)
Free int 2 int converter
 
It doesn't work. My compiler says error: ‘cin’ was not declared in this scope among other things.
[2 replies] Last: Looks like a response to a question that was deleted. How about we all... (by tpb)
by cnf21
binary search tree array implementation PLEASE
 
I have an assignment for my c++ class that is requiring an array implementation of a binary search tree. I have been given the main so it has to remain the same...
[1 reply] : > meaning there can be no parameters in the functions unfortunately ju... (by ne555)
by m1smr
Strange problem with std:.vector
 
Hello, I'm writing a chess game with C++ and SDL2 and I have a strange problem with std::vector. I have a ChessPiece class and I tried to store the player...
[7 replies] Last: I will upload the project on github soon anyway, thanks for the help. (by m1smr)
Decompressing a file using boost
 
Hello, I want to decompress a file using boost that has been compressed using bzip2 I tried the following which leads to an error I can not explain std::...
[1 reply] : You should open the file in binary mode, which makes a difference on w... (by tpb)
Please check this
 
///this program like a vending machine ///but there is a problem in the price and the input(user) money ///please help! ///run this code and you will unders...
[1 reply] : doesn't compile foo.cpp|121 col 2| error: expected ‘;’ after clas... (by ne555)
c++
 
Dear all; I am to write a c++ program that would accept a number from the keyboard and display the increment of the number with a step of 3 up to 2019 as out...
[4 replies] Last: I dunno, there's one floating out there this week and it asks 'can any... (by jonnin)
Can I use previous mapped object to create a new one?
 
Let's say I have code like this: #include <unordered_map> #include "MyClass.h" int main() { std::unordered_map<int, MyClass> mc_map...
[2 replies] Last: Thanks :D (by bheadmaster)
by Satan
Printing Unicode Characters on Windows
 
So I found this function _setmode(_fileno(stdout), _O_U16TEXT); wcout << L" ≡ works, but ≣ or \u2263 doesn't"; which needs #include <fcntl.h> #includ...
[6 replies] Last: Thanks JLBorges I'll have a look at it later when I can. By the way I ... (by Satan)
How to add ARMA_USE_SUPERLU to C++ project
 
I added successfully Armadillo library to my c++ project in visual studio(I do not have any problem to use for example sparse matrix from Armadillo), but I have...
[7 replies] Last: > \\130.88.112.127\share\Morteza\porenetwork\test\SuperLU-master\lib\l... (by salem c)
by tonyhi
arrays
 
can someone please tell me how to covert a character string into an integer array?
[2 replies] Last: maybe you mean this stoi or atoi. First is for string type of c++, ... (by jonnin)
What does *ArrayName do here?
 
I am following a tutorial on the internet and the code of the tutorial is bellow. What does *ArrayName do here? And why has it a pointer (and I don't see a Refe...
[3 replies] Last: Also, as a function parameter, void foo(T* arr) { } is equivalent to... (by Ganado)
How to Print std::array
 
Hi, the following code snippet is trying to print a std::array container generically. It is printing every element consecutively like the following 1 2 3 4 ...
[4 replies] Last: sabetaytoros , auto next(*A.begin()); if (is_integral<decl... (by homy18)
how to format this generic code
 
Hi, the following code snippet is trying to print a std::array container generically. It is printing every element consecutively like the following 1 2 ...
[2 replies] Last: #include <iostream> #include <array> #include <iomanip> // print_irp... (by JLBorges)
Card sorting
 
I have to write card sorting program using circular buffer or queue. Main idea is you have n card, and rule you /pick one card and second card put next to the ...
[1 reply] : Main idea is you have n card, and rule you /pick one card and second ... (by dhayden)
by cfql
Returning crossover child integer array issue
 
Here i am trying to implement Genetic Algorithm Crossover. However I face an issue at the return child_str; the error that is shown in the compiler i...
[1 reply] : Well the error I get is $ g++ -std=c++11 foo.cpp foo.cpp: In functio... (by salem c)
November 2018 Pages: 12345... 12
  Archived months: [oct2018] [dec2018]

This is an archived page. To post a new message, go to the current page.