Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Annettest

Hello all: I have written a function that gets data (numbers) from a text file. My function works by taking a line from the text file, discarding unnecessary symbols, and putting the numbers into a vector. Here's a snippet: // Get data from text file. Values then put into one …

Member Avatar for haider885
0
392
Member Avatar for Annettest

I have a vector of strings. Each vector element/string is a name, like: Mother_Hen. I want to remove the _ and replace it with a space. Does anyone know how to do this? I have tried using find, but have had no success (I get no result). Thank you for …

Member Avatar for srivairam
0
161
Member Avatar for Annettest
Member Avatar for Annettest

Hello all: I would be grateful for some basic advice about C++ error handling. From my reading, I understand that the "try, throw, catch" method is preferable to dealing with return values, which can be cryptic. But I'm not sure if I understand exactly how this works. I made a …

Member Avatar for Moschops
0
168
Member Avatar for Annettest

Hello all: I have read that the purpose of const member functions is to specify which functions may be used on const objects. This makes sense. An example is given in my text and I don't understand it. If anyone could help, I would be very grateful. Here is the …

Member Avatar for Annettest
0
215
Member Avatar for Annettest

Hello all: I would be very grateful if someone could help me to understand header and definitions files. A colleague told me that definitions should never be included in a header file, but I also read that template and inline functions should be included. Is this true? If so, is …

Member Avatar for thelamb
0
237
Member Avatar for Annettest

Hello all. I am having problems with compiling code on my Mac (OS X, 10.6.5). This started happening suddenly when I tried to (1) install f2c using g++, and then (2) compile code including f2c. Now I'm having problems compiling ALL code! I don't understand the error, and would really …

0
92
Member Avatar for Annettest

Hello everyone. I am having problems with compiling code on my Mac (OS X, 10.6.5). This started happening suddenly when I tried to (1) install f2c using g++, and then (2) compile code including f2c. Now I'm having problems compiling ALL code! I don't understand the error, and would really …

0
106
Member Avatar for Annettest

I am trying to compile a program using make on Mac OS X with gcc4.2. But I'm getting this error: fpu_control.h: No such file or directory I have never had a problem with an include file before and I'm rather confused! I have googled fpu_control.h, but I can't find anywhere …

Member Avatar for SgtMe
0
1K
Member Avatar for Annettest

Hi everyone: I would appreciate some help with understanding how to free memory/use destructors. I have created a 2D dynamic array template class. I'm using Xcode and Xcode keeps crashing, with the message, "out of memory." Before I implemented this array class, I was using "new" directly within main() to …

Member Avatar for Annettest
0
2K
Member Avatar for Annettest

Hello all, I have what is probably a silly question... I want to fill a 2-dimensional array called instantAct with values from another 2-d array called mS. The two arrays have different dimensions, but they have the same number of values. I want my loop to take values from certain …

Member Avatar for chief427
0
752
Member Avatar for Annettest

Hello everyone: I'm a C++ newbie. I have written code for performing calculations that needs data from another code. These data are in text files. I know how to read in an ENTIRE text file, but I can't figure out how to extract certain pieces of it. I would very …

Member Avatar for Greywolf333
0
243
Member Avatar for Annettest

Hi everyone: I need to find out about compile options in Xcode (I'm an Xcode and C++ newbie). The default compiler for OS 10.6 and XCode version 3.2.2 is apparently LLVM 2.0. Is this related to g++? Also, are there other compilers available within XCode? If so, how would I …

0
98
Member Avatar for Annettest

Hi everyone: I'm having problems constructing a loop and I'd appreciate any advice. This is probably a simple problem, but I just can't make it work! This isn't homework! I'm an old fart and I'm new to C++. Here's what I want to do: take a vector and insert it …

Member Avatar for Annettest
0
176
Member Avatar for Annettest

Hi everyone: I have written C++ code for populating a matrix/2D array with calculation results. Each column of the array represents results for a distinct time step. My problem arises because the rows of my results vector do NOT correspond to the rows of the matrix. The matrix includes extra …

Member Avatar for Annettest
0
97
Member Avatar for Annettest

Hello everyone: I'm having a problem with vector indexing. The following code results in a segmentation fault: [CODE] for (int i = 0; i < (rows * rows); i++) { temperature[(i * rows) + (rows - 1)] = 0; }[/CODE] And: [CODE] for (int i = 0; i < (rows …

Member Avatar for Annettest
0
191
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I have used Matlab to fill the rows or columns of a matrix with values from a vector and I'm wondering how to do the same thing in C++... I have written code that puts new values in a vector. This happens in …

Member Avatar for Lerner
0
239
Member Avatar for Annettest

Hi everyone: I am fairly new to c++. I have created a dynamic array, but I am having trouble initializing it. My goal is to create a grid, and then assign an initial condition (for example, initial temperature = some value) on the grid points. I know that it would …

Member Avatar for Annettest
0
172
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I aim to use C++ in my work on coupled fluid flow-chemical reaction problems. I would very much appreciate some help to get me on the right track! I apologize in advance for what is probably a very simple question. My goal is …

Member Avatar for Annettest
0
262
Member Avatar for Annettest

Hello everyone: I am a C++ newbie; I am interesting in using C++ in my work on coupled fluid flow-chemical reaction problems. I apologize in advance for what is probably a very simple question. I would very much appreciate some help to get me on the right track! My goal …

Member Avatar for Nick Evan
0
233