Hey,
I am looking to create a program/script that will go through 1 directory and look for the file extension .jpg . Now, this directory will have subdirectories and I need the program to be able...
Type: Posts; User: kippwinger
Hey,
I am looking to create a program/script that will go through 1 directory and look for the file extension .jpg . Now, this directory will have subdirectories and I need the program to be able...
Ilovevectors: thanks for the tip.
7stud: It sounds easy enough to code. I just wanted it to be easier in that I didn't want to have to create somthing else for this to work (reading data into...
hmm. Well, I was hoping I wouldn't have to do that. I was hoping that there would be a simple solution. Like ios::nocreate and some other instruction to keep it at the top. Oh well. Thanks for...
Hey, I am trying to add text to the top of a text file via a c++ program. Sound confusing? Okay, my program starts out by asking for input. When done entering the input, it outputs it to a text...
Well, I guess I got so caught up in trying to add two strings together I forgot why I was trying to do it in the first place. I tried creating a new struct from the combined string and that...
Instead of doing anything too complicated, it came down to something as simple as using the string conversion in the FAQ and this code:
int number=5;
string test="data";
string final;
...
Lithorien re-phrased my question perfectly. However, I will try JaWiB's idea.. I just took a class in Python and it seemed to be more user friendly than C++ is.. I guess I'm just spoiled. I'll let...
Is there anyway to create a counter to be incrimented and added to a struct name like:
int elem=0;
elem++;
//create struct to hold copied data
struct DataCopy;
//add incrimented variable...
Thanks, that helped a lot. I may have some more questions concerning structs. Would it be easier to use classes? I haven't gone over this stuff in about a year. Just brushing up.
I am trying to create an inventory-esque program. I want to be able to enter in some data about a product and then save it into another struct and then enter another if so desired. The problem is i...
basically i need to create a counter to count how many times the fxn is called recursively. Say like this:
int timer(int moves)//fxn to calculate # of moves
{
return moves++;
}
void...
no one has any suggestions?
Hey, I have a recursive fxn that happens to be the algorithm for the Tower of Hanoi. I need to count how many times it makes a move, but I do not know where to add the simple code of move++ or...
awesome, thanks... i forgot about that fxn
Anyone have any idea on this last problem. It is the last thing I am stuck on.
Thanks
tried that.. still gives me "error"
#include <iostream>
#include <fstream>
using namespace std;
ifstream infile;
ofstream outfile;
okay, hopefully this will be my last post .. I got it to work the way I wanted but one last thing. I need to edit the file I am writing to right after I write to it.
I tried this new code jsut to...
Okay, I have decided to create a new file to copy the data to along with the end tolkien. It copies the data without the endlines which makes me believe I might need to use getline(). It still...
This should be easy to answer.
I have a file with many lines of numbers
ie: 3+4/8
8-(5+3)
....
Anyway, I need to add the $ character to the end of each line. I forgot how to do this...
Yeah, I noticed, I changed it to an if statement and that seemed to work.. thanks for the help
Hey, I have an assignment called the Game of Life. If you haven't heard of it, feel free to look it up. Anyway, the problem I am having is the algorithm I have to compute if the living cell has...
Thank you for your help. That helped out a whole lot!
My code for calculating the data is still incorrect though. I need to fix that somehow.
If anyone can show me also, how to impliment...
Yes, another question with hopefully an easy solution.
I keep getting a segmentation fault error in g++ when I try to run a.out.. I get some different errors in Visual c++ though. The main program...
No, its not a requirement. But now the code is giving me errors about the variable CAPACITY... It says its not a member of the class, which it isn't... IT'S GLOBAL!! ugh... I will keep on working...
jesus, thats 2 mistakes that could have been easily avoided. I'm still get some errors though. I do not believe they are typos either.
anyway, I am still getting errors on the + operator...