473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to fix this code?

The code below compiles fine with vc++.6 but not with vc++.net

the error message is:

...\RegistryArray_demo\RegistryArray\RegArray.h(28 ): error C3860: template
argument list following class template name must list parameters in the
order used in template parameter list

What does this mean ???

Many thanks in advance.


#ifndef RegArray_h

#define RegArray_h

#include <afxtempl.h>

template <class T, class F>

class CRegArray:public CArray<T, F>

{

public:

CRegArray(const CString sSection, const CString sArrayName);
void FetchRegistry();

void PersistRegistry();

private:

const CString m_sSection;

const CString m_sArrayName;

const CString m_sCounterName;

};

template <class T, class F>

inline CRegArray<T,T&>::CRegArray(const CString sSection, const CString
sArrayName):CArray<T,F>(),

m_sSection(sSection),

m_sArrayName(sArrayName),

m_sCounterName(sArrayName+"_Counter")

{

}

template <class T, class F>

inline void CRegArray<T,T&>::FetchRegistry()

{

int nCounter = AfxGetApp()->GetProfileInt(m_sSection, m_sCounterName, 0);

for(int i = 0; i < nCounter; i++){

CString sElmName;

sElmName.Format("%s %d",m_sArrayName, i);

CString sTmp = AfxGetApp()->GetProfileString(m_sSection, sElmName, "");

CSomeClass clTmp;

clTmp.Parse(sTmp);

Add(clTmp);

}

}

template <class T, class F>

inline void CRegArray<T,T&>::PersistRegistry()

{

AfxGetApp()->WriteProfileInt(m_sSection, m_sCounterName, GetSize() );

for(int i=0;i<GetSize();i++){

CString sElmName;

sElmName.Format("%s %d",m_sArrayName, i);

AfxGetApp()->WriteProfileString(m_sSection, sElmName,
(*this)[i].GetAsString() );

}

}

#endif
Nov 17 '05 #1
4 1075
> The code below compiles fine with vc++.6 but not with vc++.net

the error message is:

..\RegistryArray_demo\RegistryArray\RegArray.h(28) : error C3860: template
argument list following class template name must list parameters in the
order used in template parameter list

What does this mean ???


replace

template <class T, class F>
inline CRegArray<T,T&>:: ...

with

template <class T, class F>
inline CRegArray<T,F>:: ...
--
Vladimir Nesterovsky
e-mail: vl******@nesterovsky-bros.com
home: www.nesterovsky-bros.com
Nov 17 '05 #2
Many thanks...

That solved my problem.

By the way. do you know why VS.NET can not locate

<strstrea.h>?



"Vladimir Nesterovsky" <vl******@nesterovsky-bros.com> wrote in message
news:uv**************@tk2msftngp13.phx.gbl...
The code below compiles fine with vc++.6 but not with vc++.net

the error message is:

..\RegistryArray_demo\RegistryArray\RegArray.h(28) : error C3860: template argument list following class template name must list parameters in the
order used in template parameter list

What does this mean ???


replace

template <class T, class F>
inline CRegArray<T,T&>:: ...

with

template <class T, class F>
inline CRegArray<T,F>:: ...
--
Vladimir Nesterovsky
e-mail: vl******@nesterovsky-bros.com
home: www.nesterovsky-bros.com

Nov 17 '05 #3
Bredal Jensen wrote:
Many thanks...

That solved my problem.

By the way. do you know why VS.NET can not locate

<strstrea.h>?


It, along with all "classic IOStreams" headers, was removed from the product
starting with VC7.1 (they were deprecated starting with VC7).

-cd
Nov 17 '05 #4
> By the way. do you know why VS.NET can not locate

<strstrea.h>?


This are old streams. Use contemporary streams instead.

Please read "Differences in iostream Implementation" topic in MSDN.
http://msdn.microsoft.com/library/de...ementation.asp
--
Vladimir Nesterovsky
e-mail: vl******@nesterovsky-bros.com
home: www.nesterovsky-bros.com
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: jason | last post by:
Hello. Newbie on SQL and suffering through this. I have two tables created as such: drop table table1; go drop table table2; go
16
by: Dario de Judicibus | last post by:
I'm getting crazy. Look at this code: #include <string.h> #include <stdio.h> #include <iostream.h> using namespace std ; char ini_code = {0xFF, 0xFE} ; char line_sep = {0x20, 0x28} ;
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
5
by: ED | last post by:
I currently have vba code that ranks employees based on their average job time ordered by their region, zone, and job code. I currently have vba code that will cycle through a query and ranks each...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
37
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.