113 Topics
|
|
My file structure is Project data sort main.cpp code as follows [CODE]#include <cstdlib> #include <iostream> #include <fstream> #include <string> #include "genlist.cpp" #include "genstring.cpp" using namespace std; int main(int argc, char *argv[]) { ifstream in; ofstream out; int unique=0; GenList<string> gList; gList.checkFileOpen(in,out); gList.populateNUnique(in); gList.sort(1); gList.output(); in.close(); system("PAUSE"); return EXIT_SUCCESS; } [/CODE] … |
|
Hi everyone, can you help me please with then following?? a)The C++ Standard Template Library (STL) contains a number of container data types, explain with suitable examples the advantages these give to the programmer over a procedural language such as C. b)Demonstrate using suitable code the usage of the STL … |
|
Hi All Im developing a website here's my situation. Im using one template and using template to link it to every page and using str_replace to replace parts of my site template for what is needed for each page. Any way my problem is this I have sidebar and in … |
|
Hi, I'm reasonably new to C# and even newer to WPF projects in C#, i'm having a lot of trouble getting to grips with how to use the template property and its doing m head in. Firstly an explanation of what I am trying to achieve: I am working on … |
|
Hi, just a quick question (i hope!!), i'm working on an assignment where i need to build a user-defined library of shapes. The class structure is to have "shape" as a base-class with both 2d and 3d shapes as derived classes. I've handled this by storing them in a vector … |
|
Hi, I want to develop a an application based on independent "CustomModule" that all derived from a base class "BaseModule" and that can send different kind of "CustomEvent" (derived from a "BaseModule" class) to each other. Each Module just knows that it is connected to others "BaseModule" (i.e. it does … |
|
This is likely a stupid question, but I can't figured out by myself how to pass a pointer to a member function of a templatised class in its own template parameters. More clearly: I would like to have this to work out: [code]template <typename T, T test::* PtrToMember> class test{ … |
|
I'll try to explain this the best I can. If I stop making sense, sorry. I downloaded a template from templatemonster.com and now am running into problems with the template. I understand how to edit and change pictures and text. My problem is I'm having trouble finding things. In the … |
|
Hello! Im having a problem with the following code structure. The code compiles without problems but when i start the program i get an "exception: __non_rtti_object at memory location...". In the constructor of the model-class i still can get the object information of the node-class through the base pointer. Once … |
|
[B]MyClass.h[/B][CODE]class MyClass { //... public: template <class T> static void Swap(T& Var1, T& Var2); //... }[/CODE] [B]MyClass.cpp[/B][CODE]template <class T> void MyClass::Swap( T& Var1, T& Var2 ) { Var1 ^= Var2; Var2 ^= Var1; Var1 ^= Var2; }[/CODE] In another file[CODE]#include "MyClass.h" //... int n = 40; int m = 60; … |
|
I have such a problem: when I write:[code=c++] template<bool b> void foo(void); template<bool b> class B { friend void foo<b>(void); }; template<bool b> void foo(void){}; [/code] everything works just fine. But when I incapsulate all this in another class, I receive errors: [code=c++] struct C { template<bool b> void foo(void); … |
|
Hi, So I am currently working on a homework assignment for my data structures class, basically C++, and I am having some troubles converting a working c++ program to use a template. [code] #include <iostream> using namespace std; /* -------------------------------------------------------------------------- */ /* */ /* SECTION: DECLARATIONS */ /* */ /* … |
|
Hello, Can any one provide free downloadable website templates ..?? awaiting reply, |
|
Hi, I am playing around and trying to understand template singleton class and I accidentally created something that I am surprise it even runs. What I don't understand is when did Apple and Orange instances get created? Could you also comment on the good and bad of the Singleton class … |
|
Hi guys, The following code doesn't compile, and I've been banging my head why. Some header code: [code] template <typename T, typename LESS_THAN> class RestrictedSet { private : int _size; int _max_size; set<T, LESS_THAN> _S; typedef typename std::set<T, LESS_THAN>::iterator tIt; public : RestrictedSet (int max_size); RestrictedSet (RestrictedSet<T, LESS_THAN> &other); ~RestrictedSet … |
|
I have class A and class B: template<typename T> struct A { T data; ... }; template<typename T> struct B { T data; ... }; I can do the following: B<A<int> > b1; B<A<MyOtherType> > b2; But, these lines are so ugly and I want to make special type. I … |
|
Well, I would like to know how can i print invoices in java. the page that my printer is using is like a type of template which has already written the fields(like name, address, id and so on). So, what i want to do is to print the data in … |
|
Have you ever been thinking to make calendar by yourself? Use your own photo album as decorating picture and mark some special day with special tags rather than only red circle in the calendar. you will get the chance to [URL="http://www.imediacreator.com/tutorial-photo/use-calendar-template-to-make-calendar-on-mac.html#175"][B]use free calendar templates to make calendar on Mac[/B][/URL] for … |
|
So I created a template for a simple link builder function. Problem is, when I use it, I don't get the link, I get just the text. Could anyone help me understand what I'm doing wrong? Thanks! [CODE] <xsl:variable name="ReadMore"> <xsl:call-template name="linkBuilder" > <xsl:with-param name="linkID" select="format-number(@ID, '#,##0.#;-#,##0.#')" /> </xsl:call-template> </xsl:variable> … |
|
hi all, i am developing a newsletter module for my site,previously i used a specific newsletter added by admin (using wyswyg) and it is inserted in database and like that admin can send newsletter of his type to n number of users at a time. now i want to change … |
|
[CODE]#include<iostream> using namespace std; struct Base{ virtual void print(){cout << "Base"<< endl;} }; struct Derrived : Base{ void print(){cout << "Derrived"<< endl;} }; template< Base* arr,int size = 10> class Template{ public: void print(){arr->print();} };[/CODE] [CODE]#include "template.h" int main(){ Base *b = new Base(); Derrived *d = new Derrived(); Template<b> … |
|
Hi, How can I define template formal parameter as T*? I read in some textbook that if I define template with formal parameter T* then actual parameter can be of the type T1*,provided that T1 is derived from T Thank you in advance |
|
I am writing a method that does insertion into a doubly linked list and I was looking for some assistance with my code to see if I was heading in the write direction and what needs to be fixed to make this work. [B]Instructions[/B] template <class T> Iterator<T> List<T>::insert(Iterator<T> pos, … |
The End.