Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #4K
~30.3K People Reached
Favorite Tags

17 Posted Topics

Member Avatar for tgreiner

Is there a way to catch a "program.exe stopped working" Windows error? I am not sure what to look for, or even where to look, in my code. I have the code repeat a rather complicated algorithm using different data several times. It runs fine for 27 iterations and then …

Member Avatar for tgreiner
0
329
Member Avatar for Dani

I've got to say "NO" to the tagging system. In general, I can see it's value as an add-on to the old forum system. But, as a total replacement to the forum system it is hard to navigate and hard to find related topics when you do not know what …

Member Avatar for Nick Evan
2
1K
Member Avatar for tgreiner

I have noted a bug when submitting a post to a discussion thread. Twice now, I have tried to submit something that the system "thinks" is code. I guess it did not like my paragraph indentation style. Anyhow, the posting program insists that I use the insert code snippet even …

Member Avatar for cereal
0
808
Member Avatar for tgreiner

I've created a program that reads lines from the text file. Each line is parsed to find a command and parameters that are executed. So, the essential code goes something like this: while (getline(script, scriptline)) Parse Scriptline Execture Scriptline Function This works very well for most functions. Until I get …

Member Avatar for David W
0
231
Member Avatar for tgreiner

I am trying to calculate the angle between two vectors. Here is my relevant code: cout << "\n\nPoint1 "; Point1.dump(); cout << "Point2 "; Point2.dump(); cout << "\nanswer: " << Point1.dot(Point2) << endl; cout << "\nacos: " << acos(-1)<< endl; cout << "Problem: " << acos(Point1.dot(Point2)) << endl; cout << …

Member Avatar for ipswitch
0
2K
Member Avatar for tgreiner

I want to read data into an array from a data file. Because I do not know, ahead of time, how much data is contained within the file I need to declare the array at run time using new. My current strategy is the read through the data file to …

Member Avatar for David W
0
484
Member Avatar for tgreiner

I am using fstream to open and close a file. The code works OK, except the the file does not close when I close it the first time. I need to invoke close twice. Any idea why? And, what this is saying about my code that I do not realize?? …

Member Avatar for Moschops
0
791
Member Avatar for Baalla

line 11 should be inFile.open("Problem.dat_50_50_0",std::ifstream::in);

Member Avatar for Baalla
0
259
Member Avatar for tgreiner

OK, so I've asked a question like this before and I thought I understood the answer (solved) but I am having problems again and I still do not understand why. I am compiling with MinGW. Here's the code: string filename="D:/__GNU analyze/test/bin/Debug/_ClusterFormat/Test2.6d .txt"; fstream file, file2; string cluster="frame"; string line; Matrix …

Member Avatar for tinstaafl
0
142
Member Avatar for tgreiner

I am reading a data set where each data line contains a value that I want to read over and then ignore. So, I create three variables as: int number1, number3; float number2; and read them in. I use the data in number1 and number3, but never use number2 (other …

Member Avatar for rubberman
0
4K
Member Avatar for tgreiner

OK, here is a problem that I have found described many times on the net, but have not found a definitive solution. Until recently, file writing has worked just fine for me, but no longer. The questions are: Why does it not work now? What might I have done somewhere …

Member Avatar for tinstaafl
0
9K
Member Avatar for tgreiner

In the course of my programming I have created a new class called Vector (yes I know that vector.h exists, but I like my version better, or at least I have until now). As part of my class, I have overloaded the = to use as an assingment function, as …

Member Avatar for tgreiner
0
299
Member Avatar for tgreiner

OK, I've seen this error explained at least 100 times on the net. But in every case, it seems to be an error of #including <string.h> instead of <string> or metioning string instead of std::string. But, I've done all those things. And it still does not work. By way of …

Member Avatar for Schol-R-LEA
0
10K
Member Avatar for tgreiner

When reading any beginning manual on C++ an array is introduced as follows: float A[10]; That format is valid, in that it compiles and seems to work just fine -- for a while. Later on in the manual we learn to allocate/release memory using the new and delete keywords. So, …

Member Avatar for tgreiner
0
227
Member Avatar for tgreiner

I have written some code that contains a system to report error messages to error log file. I use a class structure to do this. However, some parts of the code contain functions that I think might be useful in a more generic context. So, I am trying to use …

Member Avatar for tgreiner
0
171
Member Avatar for tgreiner

I am having a problem with overloading an operator within a class structure. Below is the program that illustrates my problem. It defines a class Matrix, creates two matrices and multiplies them. I created to multiplication functions. The first is a straight function, the second uses the overloaded * operator. …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for tgreiner

I am trying to write a function that reads numbers out of a string of comma separated values. The first function is: [code=cplusplus] unsigned get_frame(unsigned &index, char input[]) { const comma=','; char *letter; char *accum=""; unsigned out; while (input[index]!=comma) { *letter=input[index]; strcat(accum,letter); index++; }; out=atoi(accum); index++; return(out); }; [/code] This …

Member Avatar for Narue
0
143

The End.