- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
17 Posted Topics
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 … | |
Re: 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 … | |
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 … | |
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 … | |
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 << … | |
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 … | |
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?? … | |
Re: line 11 should be inFile.open("Problem.dat_50_50_0",std::ifstream::in); | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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. … | |
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 … |
The End.