43 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for James19142

Inside of a class template having parameter `typename T` the compiler generates an error concerning 2 functions. `T` does not seem to be recongnized as the template class parameter it was declared as. template <class Return, class ...Args> void executeOnAll(Return (T::*function) (Args &&...), Args &&...args) { for(T &s : *this) …

Member Avatar for James19142
0
1K
Member Avatar for can-mohan

In below code snippet , I am trying to add the intefeger and float values in Array template but was surprised to see below output for float value as 5.1 was expected there but getting 0 . Can anybody let me know what can be wrong here. output value=5 value=15 …

Member Avatar for can-mohan
0
360
Member Avatar for terryds

First, i'd like to show you my directories --themes -- images -img1.jpg -index.php -index.php My index.php (root) : <?php require_once '/themes/index.php'; ?> And, the index.php in the template : <!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <img src="images/img1.jpg"> </body> </html> I think it will load themes>>images>>img1.jpg But, it loads images>>img1.jpg …

Member Avatar for gabrielcastillo
0
213
Member Avatar for nathan.pavlovsky

Hello programmers! I have been working on STL algorithms for some time now as a beginner, and I started doing an exercise, among which is the task of `use the fill algorithm to fill the entire array of strings named items with "hello"`. My code for this is below: // …

Member Avatar for nathan.pavlovsky
0
1K
Member Avatar for boney

I have created my own template and am able to list all the posts on the index page. I want to be able to have some space after each post. Like a blank height of 5px. I created a class in css called blank5 => .blank5 {height:5px;} but it doesn't …

Member Avatar for boney
0
163
Member Avatar for G_Waddell

Hi, Getting some strange behaviour when using Interop to create a Word document from a template. I'm using word to generate a nicely formatted and printable Receipt from Sage 200 based on a Word Template. The code should open Word then create a new document based on the template I …

Member Avatar for G_Waddell
0
251
Member Avatar for kedxu

This is for anyone who might find it helpful. This template... * uses double-buffering, which can help game-makers fix that glitchy screen problem * can be exported as a runnable jar file. If you're like me and had trouble making your Applet executable, this is a possible fix. * Additionally …

Member Avatar for JamesCherrill
0
312
Member Avatar for ZeroZen

Hey folks I've finally figured out how in WPF to template all my buttons so they all behave they way I want. Basically, I want all my buttons, when clicked, to drop down and to the right a few pixels then pop back up. The problem is, I can't set …

Member Avatar for ZeroZen
0
486
Member Avatar for AARTI SHRIVAS

i have started learning joomla and now my team leader say me to covert html temlapte to joomla temlate any one have idea about that how can i achive this thanx in advance

Member Avatar for IIM
0
198
Member Avatar for LastMitch

Hi I still learning how Smarty templates works. I can't seem to make the image appear on the Smarty Template. I try to used this `{html_image}` it doesn't work. I used `<img>` instead. <img src="images/{$book->image[tbl]}" width="115"> These are my files. This is my **index.php** <?php require("libs/Smarty.class.php"); require_once("get_data.php"); require_once("books.php"); $book = …

Member Avatar for LastMitch
9
1K
Member Avatar for diafol

Hi All, not the usual, "how can you help me" thread, but a heads-up on a templating engine I've been using for a while called RainTPL. A few users have posted threads of late asking about templates. I thought I'd give this one a plug, especially as Federico (the author) …

Member Avatar for rajppd
0
944
Member Avatar for mbhanley

Hi all I am stuck trying to figure out the best way to get data as at the moment I have tried a few different ways to achieve this with no luck. What I am trying to do is update a block of php code that is in my sidebar …

Member Avatar for mbhanley
0
2K
Member Avatar for Dman01

Hey daniweb, I stumbled upon an issue I can't solve myself. Here is the code : #include <sstream> #include <iostream> template <class T> inline T htot(std::string str) { T x; std::stringstream ss; ss << std::hex << str; ss >> x; return x; } int main() { int x = htot("0x0F"); …

Member Avatar for Dman01
0
197
Member Avatar for dlannetts

Hello, Not sure if I am putting this in the right section or not but I'm sure someone will let me know if I'm not. I have recently made a email template, coded from html, I've done it in a visual editior provided with my email client. As you would …

Member Avatar for pritaeas
0
197
Member Avatar for sandz24

#include <iostream> #include <vector> using namespace std; template< typename T > using matrix = vector< vector<T> > ; I saw this code snippet while searching for templates. I was wondering why there's a word "using". What is it for? Thanks :)

Member Avatar for sepp2k
0
164
Member Avatar for saito200

Hi people! :D I'm new to html and css, aside of an artist. I am trying to create a template for art tutorials. Basically I want to have a series of rows, with a floating image to the left or right, and an explanatory textbox on the other side. The …

Member Avatar for saito200
0
148
Member Avatar for Mike Askew

Firstly I will say im a complete and total novice when it comes to XSLT and XML so this could be a very obvious mistake on my behalf. [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="TestNode"> <RenamedNode> <xsl:copy-of select="."/> </RenamedNode> </xsl:template> </xsl:stylesheet> [/CODE] When …

Member Avatar for StephNicolaou
0
197
Member Avatar for jbutardo

Hi, I have a program that needs to create a downloadable excel template with the following headers on the first row named, name, age, gender. And I also want the template to only have 1 sheet on it. how can I create a sample template using vb.net code? Thanks

Member Avatar for jbutardo
0
1K
Member Avatar for jbutardo

Hi, I just have this program that needs to create a downloadable template for the excel file that will be used later in my program, now I have this templates in my server and I think that i'll just import this file first and then put it in the data …

0
141
Member Avatar for Allander

I'm trying to pass a list from a function to another using templates but get this error message: [QUOTE]/home/mattias/CodeBlocks/SpelBeta/src/player.cpp|64|undefined reference to `void Ground::bulletsCollition<Bullet>(std::list<Bullet, std::allocator<Bullet> >)'|[/QUOTE] Here is the code: [CODE] //In the function calling the template function (*blocks).bulletsCollition(player_bullets.getList()); //In header that the getList is declared #ifndef BULLETLIST_H #define BULLETLIST_H #include …

Member Avatar for mike_2000_17
0
11K
Member Avatar for tvm78

So I'm trying to write a program that is due tomorrow. I am trying to overload operators and dealing with template classes. I have everything written already but keep getting this error whenever i try to compile the driver file: NOTE: proj4.cpp has #include "box.h" and box.h compiles fine, but …

Member Avatar for NathanOliver
0
270
Member Avatar for Paradox 99

Hi, A bit of searching reveals that a few people have asked this question before, but I can never see the solution revealed. I have a gridview and I've added a column with a template field so that I can put a checkbox control in it. Finding it is no …

Member Avatar for catherine sea
0
205
Member Avatar for kaizerkiller

What I want to do is to put links, like product categories along with its product subcategories, on the left and right panel but I don't know how to do it. :sad: All I know is how to modify the header, navigation, content and footer. But I got a hard …

Member Avatar for kaizerkiller
0
116
Member Avatar for learningcpp

Hi All, Can you please help me to understand why the following code is behaving this way? I think both outputs should be 1 ( 1 means const T), but its not!! [CODE] template <typename T> struct IsConst{ enum {isConst = 0}; }; template <typename T> struct IsConst<const T>{ enum …

Member Avatar for learningcpp
1
3K
Member Avatar for mmartino

Hello, I am trying to write a templated linked list, and I am having some difficulties with the add() function. It seems like different behavior occurs depending on how I add to my list, but my two test cases don't seem that different to me. I'll post the list.h, and …

Member Avatar for Fbody
0
177
Member Avatar for Labdabeta

I need a few helps for some things that I just cannot get the syntax of! (I need these, and if you don't believe me I can post the reason) 1) Creating a function within a function 2) Creating a class within a function 3) Declaring a template function outside …

Member Avatar for mike_2000_17
0
125
Member Avatar for Labdabeta

I am working on making an error header file and this is what I have: [CODE]#include <stdio.h> #include <stdlib.h> #include <iostream> #include <sstream> #include <string> #define VANARGS(n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38,n39,n40,n41,n42,n43,n44,n45,n46,n47,n48,n49,n50,n51,n52,n53,n54,n55,n56,n57,n58,n59,n60,n61,n62,n63,N,...) N #define __VA_NARGS__(...) (VANARGS(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)) #define ERROR(...) (\ (__VA_NARGS__(__VA_ARGS__)==0)?"NONE":(\ (__VA_NARGS__(__VA_ARGS__)==1)?(_1(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==2)?(_2(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==3)?(_3(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==4)?(_4(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==5)?(_5(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==6)?(_6(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==7)?(_7(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==8)?(_8(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==9)?(_9(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==10)?(_10(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==11)?(_11(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==12)?(_12(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==13)?(_13(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==14)?(_14(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ (__VA_NARGS__(__VA_ARGS__)==15)?(_15(__VA_ARGS__,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)):(\ …

Member Avatar for Labdabeta
0
252
Member Avatar for Labdabeta

I made a header file to convert strings to numbers of base X. That is I want: [CODE]int num=B<16,int>("FFF");[/CODE] To equal: [CODE]int num=0xFFF;[/CODE] Here is the code so far: [CODE]#include <string> int numb(char in) { if (in>='0'&&in<='9') return in-'0'; else if (in>='a'&&in<='z') return in-'a'; else if (in>='A'&&in<='Z') return in-'A'; } …

Member Avatar for Labdabeta
0
138
Member Avatar for arthurav

I have the following program : [CODE] #include<iostream> #include<string> #include<conio.h> using namespace std; template <class T> class matrice { T **a; int m,n; public: matrice(); matrice(int,int,int); matrice(char *); matrice(int,int,T **); matrice(matrice &x); ~matrice(){}; template <class U> friend ostream &operator <<(ostream &,matrice<U> &); int getNrLinii(){ return m; } int getNrColoane(){ return …

Member Avatar for Fbody
0
187
Member Avatar for white feather

[CODE] <Window.Resources> ... ... <DataTemplate DataType="{x:Type my:Section}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Name}"/> <TextBlock Text=" "/> <TextBlock Text="{Binding Path=Instructor}"/> <TextBlock Text=" "/> <TextBlock Text="{Binding Path=Cours}"/> </StackPanel> </DataTemplate> <DataTemplate DataType="{x:Type my:Instructor}" x:Key="InstructorDataTemp"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=FirstName}"/> <TextBlock Text=" "/> <TextBlock Text="{Binding Path=LastName}"/> </StackPanel> </DataTemplate> <DataTemplate DataType="{x:Type my:Cours}" x:Key="CourseDataTemp"> <StackPanel Orientation="Horizontal"> <TextBlock …

Member Avatar for white feather
0
171

The End.