User Profile
Collapse
-
thanks for your help
in the end I just decided to set a limit to the number of files and initiate them ahead of timeLeave a comment:
-
variable name from string
I'm wondering if there's a way of creating a variable with its name coming from a string.
The reason I need to do this is because I have to create a bunch of xml files (each defined by the user) at runtime. I kept them in an array, but I have no way of differentiating between them. I need to input different data into specific files, and right now everything is just writing to the last file I created.
Any ideas??... -
-
compilation error
Hi there,
I'm a newbie at this, and I would really appreciate some help on this.
I have a class called Writer, and in different class I have a dynamic Writer array called xmlWriterArray.
//create a new XML writer for the new output file
Writer* w= new Writer ();
//add the new writer into xmlWriterArray
xmlWriterArray [xmlCount-1] = w;
I want to add a new... -
enum
Hi there,
I'm fairly new at this, and I am having a bit of trouble wrapping my head around some concepts of enum for a project. So any help would be greatly appreciated.
Essentially I'm writing a program where i will have an enum in one of my classes. When the program is used, the user will define what actually goes inside the enum.
So for example what I mean is if the class is WorkDay....and the user defines... -
wow...thanks so much
wasn't it silly how I wrote the program without knowing the name of the method i'm using? I took an idea someone suggested to me and just kinda went with it. And I am now stuck on explaining exactly what I did. haha...Leave a comment:
-
instance - definition and analysis
Hi there,
I am doing a programming project in which there is a written essay/report component along with a coding component.
In my codes, I used instance variables so that I wouldn't keep on recreating new objects. And every time I need to call a Rec object I just use:
Rec* r = Rec::instance() ;
Rec* Rec::instance()
{
if (!myInstance)
{
myInstance = new Rec(); ... -
printing xml with css
Hi everyone,
I'm fairly new at this and I need a bit of help.
I created a xml file with a css stylesheet to go along with it. But when I go to print preview, the file looks like the way it would without any stylesheet. I'm wondering how I can print it out nicely?
I read there are programs that can help me print it, but is there a way to do it just by altering the codes?
Also, it seems that the... -
-
creating single instance
Hi there,
I'm having a little trouble getting this, so please excuse me if my question and description sounds confusing or juvenile.
I'm creating a new class called 'Rec'.
And essentially I want to reuse the same instance object (myInstance) every time. So it would be created the first time i initiate the constructor, but the following times it would just refer back to the same one.
...Code://the
-
dev c++ help
Hi there,
I'm fairly new at this, so any help is greatly appreciated.
I'm using Dev C++ to edit, compile and run my C++ programs.
But when I try to run a program with an output....I see the dos window flash on the screen and then disappear again.
I'm not sure if I have the setting wrong or something....be cause everything compiles successfully and runs as well...I just can't see the output. I tried this... -
undefined reference
Hi there,
I'm relatively new at C++ and I'm wondering if I can get some help on this error I'm having. I'm trying to run this sample code I have that should be correct. All of my files compile successfully, but when I try to run them, I get the following error:
g++.exe C:\DOCUME~1\Own er\Desktop\499\ Main.o -o C:\DOCUME~1\Own er\Desktop\499\ Main.exe -Wall -fpermissive -Wno-sign-compare -g
C:\DOCUME~1\Own er\Desktop\499\ Main.o:...
No activity results to display
Show More
Leave a comment: