50 Topics
|
|
I'm trying to build my first template function, but it generates a compile error when lines 21 and 22 are not commented. What I'm trying to do is to have a template function that can return multiset<int>, multiset<double> or multiset<string> depending on the attribute I want to extracto from the … |
|
What's wrong with this code.... //templates #include<iostream> using namespace std; template <class t> t max (t w,t x) [B][COLOR="Red"]--->here i get no error if I use &w and &x in place of w and x...[/COLOR][/B]{ if(w>x) return w; else if(w!=x) return x; } int main() { int a=10,b=343,c; c=max(a,b); cout<<"Max="<<c; … |
|
I have seen some WordPress templates for ecommerce sites. It seems good but I do wonder if anyone here have used them and what where their experiences? Please share. |
|
Hello Everyone, I've been trying to see if it would be faster to learn to slice my layouts in Fireworks CS4 and export to Dreamweaver or just continue to prepare my assets separately in Photoshop and manually piece them in Dreamweaver. TO that end I have attached the Free PSD … |
|
Hey all, I'm implementing a hash table for a spell checker and need some assistance on vector const_iterator - at least I think that's where the problem lies. Can anyone assist in diagnosing how to fix these compiler errors? I initially got this error, which i think will come back … |
|
Hello all, I would be grateful for some help with a function template problem. I cannot figure out how to pass a matrix as an argument in a template function. I keep getting the error "does not match any template declaration". Can anyone suggest what my problem is? Have I … |
|
In a nutshell I am trying to write a program that will connect to a database, query several tables for various sets of data that will then be transformed into XML that is stored into a file on the local hard disk. My first thought process to solve this problem … |
|
Last summer I took a job working on a small company's website. At first I just added some pages they wanted, but by the end of the summer, I rebuilt it from the ground up. The original version looked like something from the nineties, complete with scrolling text and a … |
|
Dear all, I'm creating a set of functions to handle stl vectors. Some are useful for achieving my goals. I'm coding some other just for fun. But after some coding I see I cannot compile them propperly. One example would be a vector print function which prints all the elements … |
|
hi, folks. I want to use flash templates in my asp.net application, bt dont know how to do it. So i hv basically two questions to ask: 1) Is it possible to use flash templates without much difficulty in asp.net project. 2) Can we somehow using some tool or application … |
|
I am trying to customize a flash template for my needs. The site is consisted of Portfolio (Photo gallery), About Me, Archives, Awards and Contacts pages... I managed to customize the Portfolio page changing the previously added photos. Now i have to change the text of the other 4 pages. … |
|
Writing a function to search an array for a value and return the index if found. in finding what the size of the array is for use in the while loop condition i found that here inside the templated function sizeof(data) comes back as 4(it should be 40) but when … |
|
Is there any way to reduce the number of times you have to write: template<typename T> for a bunch of functions all using the same template parameters? i.e., something like this: template<typename T> namespace my_functions_using_T { T function_do_something(const T & t); void function_do_something_else(T & t); } (besides making them all … |
|
Can anyone tell me the best free sites with Christmas cards, templates and games? It is urgent! Please HELP!!! Please HELP!!! |
|
Hi all, I had been developing a new website regarding templates with Html & CSS. In the home page I had given preview of templates as thumbnails. But in these Thumbnail only header is being displayed. I need whole template to be displayed in those thumbnails. Can anyone please help … |
|
Hi, I am searching for a software to help me make my sites templates. I currently use [url]http://www.artisteer.com/[/url] but was wondering if there are any other ones out there. Cheers, Vishal |
|
[CODE] void readData(ifstream& file, char& operation, int& numOfData) // Purpose: To read data from a file specified by the user { file>>operation>>numOfData; if(operation == 'I') { Array<int>* array; array = new Array<int>(numOfData); } } [/CODE] That's where the problem is coming from. [CODE] const int DEFAULT_SIZE = 30; template <class … |
|
I'm attempting to use a specialized function to search an array of c strings for the longest (or first tied for longest) member. Right now, I'm getting [inlinecode]line 87 error: invalid conversion from `char' to `const char*'|[/inlinecode] on my comparison statement. If I switch the templates' inputs to const, I … |
|
while syntactically templates cannot be virtual functions, I wonder what approach to use when semantically this is what someone wants to do. for example, in my case I want to have a virtual function, because I'm using sub-classes while having a pointer to the base class, but I also want … |
|
Hi! I'm running Ubuntu 9.04 and using Code::Blocks as C++ IDE. I have the following code: Temp.h: [CODE]#ifndef TEMP_H_INCLUDED #define TEMP_H_INCLUDED template <typename T> class Temp { public: Temp (T d = T(0)): _dato(d) {} T getDato () const; void setDato (T d); private: T _dato; }; template class Temp<double>; … |
The End.