General C++ Programming (Page 12)

How to read data in files and extract numbers?
 
I have some data stored in a file formatted like this (yes it is a result from OpenFOAM): FoamF...
[2 replies] Last: @lastchangce thank you for your reply I am learning OpenFOAM and C++ ... (by dongwang)
using pointers to populate a dynamic array
 
I am learning C++ and I have an assignment that asks me to write a program that reads in data from a...
[9 replies] Last: it's always the simplest little things that get past me. Thank you so ... (by Carlos2047)
Avoid halting the program with getline()
 
I'm writing a program which needs to be able to read data from stdin with getline(), cin or some oth...
[12 replies] Last: It is very much possible to do this, but it requires OS-specific code ... (by Duthomhas)
How shall I implement this for larger numbers?
 
Consider the following algorithm, which generates a (not necessarily uniformly) random permutation o...
[4 replies] Last: plzz give me the output for n=4,n=5,n=6 maybe i'll give you the whole ... (by ffloyd)
where are values coming from ?
 
Have a .cpp/.h: .h class camera_param { public: camera_param(); void set_cam_vars(cv::SimpleB...
[11 replies] Last: Don't know what the problem was, but the program is functioning just f... (by technologist)
C++ to Excel VBA
 
Hi need a Excel VBA version of the following code. //#include <Rcpp.h> //#include <math.h> //#i...
[2 replies] Last: everything I see in this program is doable in excel, with pretty much ... (by jonnin)
For loop executes but does not seem to be calculating correctly
 
Following code when executed does not appear to be calculating correctly? Any advise would be great...
[1 reply] : Hello, Please use code tags when posting. int purchasePrice; int p... (by alonso12)
simple question about copy constructors
 
Hello everyone! I have a very simple question. If you execute this simple code : #include <...
[3 replies] Last: Actually I don't know that I am right ... I'm sure that the issue is t... (by lastchance)
Problem with recursion
 
I'm getting this error and have no clue how to solve it it's probably one of my curly braces but can...
[1 reply] : @Fundoram, You will get more attention if you put code in code tags - ... (by lastchance)
by RCane
Class constructor with struct as argument
 
I am trying to use a constructor that has a Struct as an argument - unsuccessfully. The TESTER const...
[1 reply] : TESTER(Business Business) The name of the var must be different from... (by Thomas1965)
My try Again Loop is not working correctly
 
My programs test to see if the user input is a well formed formula. My try again loop in my code d...
[5 replies] Last: so the output is suppose to just rerun the program asking for another ... (by nightskyxXx)
Calculating if circles are touching, not touching, or overlapping using class Circle
 
So i'm in a pickle, i'm trying out how to use my preset values that I used for the two circles? I ha...
[2 replies] Last: if (getD == c2.getRadius + c3.getRadius ) Hi, Equality is problema... (by TheIdeasMan)
Reverse and changing case in the For loop...
 
The program should be in "For loop":
[2 replies] Last: joee, you haven't shown any effort in attempts to solve this problem, ... (by Ganado)
solve the linear equation
 
I am trying to solve the linear equation A.x=C. I created the matrix as shown below to find the x. W...
[8 replies] Last: As @helios and @ganado have shown you, you cannot afford to store a ma... (by lastchance)
Partial differential equation
 
I am trying to solve a Partial differential equation using finite difference method in c++. is there...
[3 replies] Last: It's a 2-d diffusion equation (if A, B, C are positive). Look up Crank... (by lastchance)
by rcx11
error: invalid user defined conversion
 
I'm attempting to implement a lambda to return the largest number of characters in an arbitrary grou...
[9 replies] Last: I think I was too hasty to make that claim. In any event, "generic" ... (by mbozzi)
How to make objects without calling parameterised constructors?
 
How to make objects of a class without calling parameterised constructors? I have only one parameter...
[1 reply] : You need to create an default constructor - either with no parameters ... (by Thomas1965)
C++ Char Start with [P] and Convert
 
C++ Version 11 How to start basic code for below code? The program should be in the loop. If the ...
[1 reply] : #include <iostream> // std::cout #include <sstream> // std::... (by homy18)
Threads
 
Hi I have a program that can use an odd or even amount of threads - based on a passed in paramet...
[2 replies] Last: Ok that makes sense. So what path would I follow in order to make ea... (by parallx)
overloading the + operator
 
Hi I need to overload a + operator to assign memory in a 1D array of pointers. operator+: Thi...
[7 replies] Last: The spec doesn't ask for any checks. It only asked for checks in the d... (by parallx)
Pages: 1... 1011121314... 16
  Archived months: [aug2018]

Cannot post in this page. To post a new message, go to the first page.