Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
1
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~14.6K People Reached
Favorite Forums
Favorite Tags
c++ x 79

18 Posted Topics

Member Avatar for TheWolverine

Hi all, I've browsed the net trying to find a paradigm to describe what I'm looking for but haven't been successful. So I'll try to explain it as succinctly as I can. Right now, for my PhD research, I've set out a few applications that take input files that have …

Member Avatar for TheWolverine
0
240
Member Avatar for TheWolverine

Hi all, I've been struggling with something for a number of weeks now and I just can't seem to solve it. I've got a bit of code that looks as follows: [CODE] class classA { public: classA( ); ~classA( ); classBBase* pointerToClassBBase; protected: private: }; class classBBase { public: classBBase( …

Member Avatar for TheWolverine
0
403
Member Avatar for TheWolverine

Hi all, I'm busy writing a generic textfile reader class and I'm struggling to write the code to deal correctly with end-of-line (EOL) characters for Mac, Linux and Windows. I've done a fair bit of reading on the issue and I came up with the following function within my TextFileReader …

Member Avatar for TheWolverine
0
563
Member Avatar for TheWolverine

Hi all, I've setup a class within my software package to read generic text files. For this, I'm using the getline( ) function and then parsing each line for specific types of files. In setting this up, I've come across the ACSII incompatibilities between Windows systems and Unix systems. I …

Member Avatar for mike_2000_17
0
387
Member Avatar for TheWolverine

Hi all, I've got quite a simple question and after searching here and on other websites I can't seem to resolve what the "correct way" of doing this is in C++. Below is a simple piece of code illustrating what I am trying to do: [CODE] #include <iostream> class BaseClass …

Member Avatar for TheWolverine
0
353
Member Avatar for TheWolverine

Hi all, I've scoured the internet for examples that would allow me to figure out how to apply functors in my specific case, but I just can't seem to make the shift from the examples I find to figuring out how to use it for my own code. Here is …

Member Avatar for TheWolverine
0
94
Member Avatar for TheWolverine

Hi all, I've found a few references that address this issue, however I haven't figured out what the solution is in the specific case that I'm dealing with. Hopefully someone can help me out. The following code prototypes the general idea that I'm working with: [CODE] class FooClass { public: …

Member Avatar for Stefano Mtangoo
0
4K
Member Avatar for TheWolverine

Hi all, I am currently working on a large software project for scientific computing for my PhD research. I am working on the architecture for part of the project now, and I am struggling with how to working with a polymorphic pointer as a function input parameter, by reference. The …

Member Avatar for TheWolverine
0
302
Member Avatar for TheWolverine

Hi all, My title might not describe this problem as well as it could, but I'm not sure what area this problem falls under. I have a simple base class and derived class as follows: [CODE] class BaseClass { public: BaseClass() { parameterA_ = -0.0; parameterB_ = -0.0; } virtual …

Member Avatar for mrnutty
0
75
Member Avatar for TheWolverine

Hi all, I have an issue with a piece of code that I am writing. The problem I'm facing is that I have a base class and a derived class, and the base class contains a pure virtual function. I then want to overload the pure virtual function with a …

Member Avatar for mrnutty
0
2K
Member Avatar for TheWolverine

Hi all, I am in the process of optimizing my code and I was wondering what the fastest way is to compute trig functions. I profiled my code and to my astonishment discovered that one of the most time-consuming processes is computing cos(theta) and sin(theta) using the implementation of cos() …

Member Avatar for nezachem
0
134
Member Avatar for TheWolverine

Hi all, This might be bit of a silly question, but it's stumped me now for over a day and I've scourged the net for info but haven't found anything to sort out what I should be doing. I am currently using Qt Creator 1.3.1 (Based on Qt 4.6.2 (32 …

Member Avatar for TheWolverine
0
2K
Member Avatar for TheWolverine

Hi all, I am trying to write a general function that when called is able to write the value of all the member variables of an object passed to it. This function is part of a class. The class objects that I want to write out each have a member …

Member Avatar for TheWolverine
0
335
Member Avatar for TheWolverine

Hi all, I was wondering if there is any standard way in C++ (perhaps in the standard library) of handling mathematical equations that are composed of +/- signs. For instance, if you are given the equations: [quote] y = +/- sqrt(x) z = +/- y [/quote] Is there an efficient …

Member Avatar for TheWolverine
0
149
Member Avatar for TheWolverine

Hi all, I've spent the last week trying to sort this out, and the more I delve into it, the more confused I'm getting. I've done some background research (searched on google and here for sort function issues) and really I can't make head or tail of what's going on. …

Member Avatar for dusktreader
0
4K
Member Avatar for TheWolverine

Hi all, I have a simple mathematical series that I need to expand fully and I am not sure what the most efficient way is of achieving this. I know I can write a for-loop quite simply to do this but I don't know if a solution already exists in …

Member Avatar for dusktreader
0
149
Member Avatar for TheWolverine

Hi all, I'm busy coding up some classes now and I was wondering if there is any danger in using a variable name twice, if the variable is limited to local scope. For instance, let's say I have the following piece of code: [CODE] class Foo { void function1( double …

Member Avatar for Fbody
0
292
Member Avatar for TheWolverine

Hi all, I am just getting into the world of OOP and I'm not totally sure in what situations it's better to use objects and when it's simpler to just revert to arrays. For example, I am currently re-writing a bit of scientific code written in C that simulates the …

Member Avatar for TheWolverine
0
170

The End.