General C++ Programming - April 2018 (Page 6)

You are required to design a program to calculate the net salary of the employees working for the company.
 
You are working in a small company as a programmer. You are required to design a program to calculate the net salary of the employees working for the company. ...
[2 replies] Last: #include<iostream> #include<string> using namespace std; int main() ... (by Haravin)
How To Solve The "Unhandled exception... std::bad_alloc" Problem?
 
Hello Professionals, Good day. It is known that dynamic arrays are powerful than static arrays considering the fact that dynamic arrays can handle huge number ...
[10 replies] Last: > I am wondering if this "boost/numeric/ublas/matrix_sparse.hpp" libra... (by JLBorges)
How Will I Compute The Normals at Vertices using 2D Object?
 
Hello Professionals, Good day. I would like to ask if how will I compute the surface normals (BLUE) and the normal constraints (GREEN) from any 2D object usi...
[16 replies] Last: Hello Professionals, Thank you again to all of you (especially to @la... (by kindgnice)
How To Implement Linear Arrays in C++?
 
Hello Professionals, Good day. I just realized that it's better to implement arrays in C++ such as shown below: index = [(i*height*depth) + (j*depth) + k]...
[5 replies] Last: Thank you very much guys for sharing your thoughts. God bless you all!... (by kindgnice)
Problem with Text art in console
 
So basically I was trying to put a text art in the console and all of a sudden the text art is mess up std::cout << " ____ _ _ _____ ...
[4 replies] Last: One way to display it (using raw strings, so the newline needs to be o... (by tpb)
Some Array Issues
 
Hello. I'm working on an array where I have to sum up Star Wars figures. Code looks like this at the moment: #include <iostream> #include <string> #include <...
[1 reply] : It's pointless and unusual to not use element 0 in C. It's important t... (by tpb)
by zetef
Using header file with class
 
I have a main cpp file where I want to use a class from another cpp file. The other cpp file, console.cpp, has a class with a constructor and a destructor. I wa...
[3 replies] Last: Thanks both of you! (by zetef)
how can I fix this
 
int main() { ofstream gaming; gaming.open("games.txt"); gaming << "nintendo 1981 mario donkeykong \n"; gaming << "sega 1991 sonic tails \n"; g...
[2 replies] Last: The guy is a proven troll. Ignore. (by tpb)
by Mk87
random binary number generator
 
Hello I wrote this piece of code for generating a random binary number with two for loop like the following: there are 2 problems : 1) when I replace it in th...
[5 replies] Last: The error is fixed with this std::srand(unsigned(std::time(0))); ... (by tpb)
by CFLam
Measure time problem
 
Hello all, I want to measure running time in differemt part of my program, therefore I build a class like this: class MyTimer { clock_t begin_time, end_...
[4 replies] Last: @Peter87, yes, I do exactly what you said to solve the problem. (by CFLam)
MATLAB and C++ Automatic coupling
 
Hi support, I would like to develop an automatic coupling between C++ and MATLAB . In simple Word: - Import in C++ the data from a .mat file - Run the simula...
[1 reply] : https://www.mathworks.com/help/matlab/text-files.html (by tpb)
Classes
 
In class Persoana, how to use the constructors? In main i will get errors with p1 and p2 objects because of that. I am not allowed the change the main() or to a...
[4 replies] Last: Thanks for your help. I am new to c++ Classes that's why i don't know ... (by Gameloverr)
Pointers and class error
 
Hello, I am currently working on a program in which allows one to generate a new page after every 280 characters. In addition new page at 274 characters with no...
[5 replies] Last: post the all the code again in one post with all your cpp files (inclu... (by adam2016)
Hash Table using map and structrure
 
if anyone could tell me how to program an insert/ collision tracker using a map, bucket struct with openaddressing and seperate chaining using a singly linked l...
[1 reply] : Read this tutorial: http://eternallyconfuzzled.com/tuts/datastructures... (by JLBorges)
try catch throw
 
#include <iostream> #include <fstream> ofstream gaming; gaming.open("games.txt"); gaming << "nintendo 1981 mario donkeykong \n"; gaming << "sega 199...
[4 replies] Last: this is probably what you are looking for if(!gaming.is_open()){ ... (by adam2016)
New to Programming
 
Hello everyone, I was wondering if anyone can sort of tutor me for like 30 minutes just so i may ask some questions?
[3 replies] Last: The best person who can properly teach you how to program is yourself... (by nether)
by CFLam
vector of struct reference in class issue
 
Hello all, I define a class as follow: class ParamClass{ struct FilterCtrlStruct { string Fldr; bool NeedChg; string FileSuf; }; vector<F...
[1 reply] : Its late night on my side, I better go to sleep Zzzzzzz I find the pro... (by CFLam)
by Arooom
Simple console chess game
 
Hello, I am trying to create a simple console chess game by using a class JustABoard with an 8x8 array of the board and class Board . (However with valid m...
[no replies]
can i redefine a function?
 
can i redefine a function?
[12 replies] Last: the big problem, on C++ rules, is that i can't change variables on Glo... (by Cambalinho)
Creating Hash maps.
 
I have been struggling for days and i dont think that i am doing this right at all. Any help would be appreciated. typedef unsigned int unint; //this...
[1 reply] : I can't understand it. Maybe you could give a complete description of ... (by tpb)
April 2018 Pages: 1... 45678... 17
  Archived months: [mar2018] [may2018]

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