Well RwD, to answer my own question =P
I've seem to not define a default constructor for the base class, the following definition for the base class solves all:
class ELEMENT
{
public:
string element_name;
string element_data...
On the following code I get an error for the TEST constructor, saying:
"cannot construct base class 'ELEMENT'"
WHY!?????
my.h file (part):
-----------------------------------------------------------
class ELEMENT
{
public:
string element_name;
string element_data...
There was a bug in the Metroworks Codewarrior 5.3 library that caused my problem, below is the fix:
please know that version 6.0 and higher (up to 8.x as I write this) do not have this bug, and that version 4.0 and less are probably to different from 5.x to be fixed with this code (i didn't...
does this also help me in having a wostream stream output unicode characters as unicode?
I checked my code, and it seems as if the << operator is overwritten in ostream, causing it to output my wide chars as ascii instead of unicode
if not, do you know the solution?
I am using a wostream for outputting data to a file, minor problem, the wide-outpt-stream doe not output as wide...
the output is ANSI, ASCII or whatever you want to call it,
I runned it in debug, and found the characters are all unicode before I send the to the stream (<<) and I add no ascii...
found the answer to part 1;
ofstream fout( "results.txt", ios::out ) ;
instead of
ofstream fout( "results.txt", ios::app) ;
which obviously appends, but I got the abr. wrong, and thought it meant something else....
I still need the answer to nr 2!!!!!!!!!!!!!!!!!!!!!!!
Hi,
I have a two part C++ question:
1, I am using fstream to output stuff to a file, however, fstream appends, not clear the opened files content first, I can't find a function which does this, any thoughts?
2, I must use unicode, but as it seems the fstream doesn't use unicode, can this be...
Why is it not possible to make a declaration with an XML schema dat declares an element with maxvalue=720 and minvalue=-720 and an attribute called Unit (Degree, mm, aso)
please tell me, because XML drives me nuts with all the things it can't do, doesn't anyone have a good reference for me???
oops, appearantly the simpletype tag is not reserved for elements only....
<xs:attribute name="Unit" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Degree"/>
<xs:enumeration value="Inch"/>...
I want to achieve the following:
<xs:attribute name="Unit" >
<xs:restriction base="xs:string">
<xs:enumeration value="Degree"/>
<xs:enumeration value="Inch"/>
</xs:restriction>
</xs:attribute>
this is not correct, but w3schools says restrictions...
You know, I really hate these languages that say they are good on every aspect, and stuff, I can't even declare such a simple thing like this?? The thread you put on the bottom does work, but it allows text to be present togheter with the tags, I'll go for my any tag for now, and hope nobody...
This seams to give me the effect I want, but I am not happy about it:
<xs:element name="name">
<xs:complexType mixed="true">
<xs:choice>
<xs:any minOccurs="0" maxOccurs="1"></xs:any>
<xs:sequence>
<xs:element ref="first"/>...
I have just started using XML, but among many things I have to do the following:
Within my xml file I have the need for a name tag that can exist in two ways:
1. <Name>John Doe</Name>
2. <Name>
<First>John</First>
<Last>Doe</Last>
</Name>
It must be one or the other, how can I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.