Click here to Skip to main content
15,908,455 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Create a C++ dll to be called from JAVA and PHP Pin
Stuart Dootson30-Jun-09 9:43
professionalStuart Dootson30-Jun-09 9:43 
QuestionVS and Qt linking differences Pin
thebeekeeper30-Jun-09 7:16
thebeekeeper30-Jun-09 7:16 
AnswerRe: VS and Qt linking differences Pin
Stuart Dootson30-Jun-09 9:29
professionalStuart Dootson30-Jun-09 9:29 
QuestionConstructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 5:14
BeerFizz30-Jun-09 5:14 
AnswerRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 5:44
professionalStuart Dootson30-Jun-09 5:44 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ [modified] Pin
BeerFizz30-Jun-09 6:10
BeerFizz30-Jun-09 6:10 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 7:04
professionalStuart Dootson30-Jun-09 7:04 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 6:13
BeerFizz30-Jun-09 6:13 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 6:59
professionalStuart Dootson30-Jun-09 6:59 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
BeerFizz30-Jun-09 10:38
BeerFizz30-Jun-09 10:38 
GeneralRe: Constructing and Accessing a RecordSet from COM in C++ Pin
Stuart Dootson30-Jun-09 11:24
professionalStuart Dootson30-Jun-09 11:24 
Questioncreating and writing data to an xml file in vc++6.0 Pin
kir_MFC30-Jun-09 3:44
kir_MFC30-Jun-09 3:44 
AnswerRe: creating and writing data to an xml file in vc++6.0 Pin
Naveen30-Jun-09 4:30
Naveen30-Jun-09 4:30 
QuestionWhy have you reposted this? Pin
led mike30-Jun-09 4:37
led mike30-Jun-09 4:37 
AnswerRe: creating and writing data to an xml file in vc++6.0 Pin
David Crow30-Jun-09 4:45
David Crow30-Jun-09 4:45 
QuestionCapture Ctrl+Pgup event Pin
reply2am30-Jun-09 2:02
reply2am30-Jun-09 2:02 
AnswerRe: Capture Ctrl+Pgup event Pin
David Crow30-Jun-09 3:44
David Crow30-Jun-09 3:44 
Questionreading and writing xml files in vc++6.0 Pin
kir_MFC30-Jun-09 1:17
kir_MFC30-Jun-09 1:17 
AnswerRe: reading and writing xml files in vc++6.0 Pin
Madhu Nair30-Jun-09 1:28
Madhu Nair30-Jun-09 1:28 
GeneralRe: reading and writing xml files in vc++6.0 Pin
kir_MFC30-Jun-09 3:04
kir_MFC30-Jun-09 3:04 
QuestionRe: reading and writing xml files in vc++6.0 Pin
David Crow30-Jun-09 3:10
David Crow30-Jun-09 3:10 
AnswerRe: reading and writing xml files in vc++6.0 Pin
kir_MFC30-Jun-09 4:06
kir_MFC30-Jun-09 4:06 
QuestionRe: reading and writing xml files in vc++6.0 Pin
David Crow30-Jun-09 4:12
David Crow30-Jun-09 4:12 
QuestionUsing Class Template in Visual C++ [modified] Pin
emira6730-Jun-09 1:01
emira6730-Jun-09 1:01 
Hello,

I wrote template which return matrix in Window Form Application .My template is below:


template<class T>
    class matrix1 {
    protected:  

    public:
          T *data;

            const unsigned rows, cols, size;
                matrix1(unsigned r, unsigned c) : rows(r), cols(c), size(r*c) {

          data = new T[size];
            }
            ~matrix1() { delete data; }
            void setValue(unsigned row, unsigned col, T value) { 
                    data[(row*cols)+col] = value;
            }
            T getValue(unsigned row, unsigned col) const {
                    return data[(row*cols)+col];
            }
};


I wrote this code in Main Project File in Windows Form Application.I defined 341*680 matrix with using this template :
matrix1<double>A(341,680);



I used function that do operation on this template and I defined it like this:


void function(matrix1<double> &b,array< double>^ temp)



And call it:

function(A,temp);


(temp is one dimensinonal data array that I have to use for my programming algorithm)

For Example;When I want to print data that is located in the first row and first column.

Visual C++ recognise getvalue and setvalue function ,but couldn't print anything and gave a lot of error interested with array1 template

I tried this template and function on CLR Console Application and it worked.How could I do this On Windows Form Application.And Where should I locate template class on Windows Form Application.

Best Regards...

modified on Tuesday, June 30, 2009 8:48 AM

AnswerRe: Using Class Template in Visual C++ Pin
«_Superman_»30-Jun-09 1:08
professional«_Superman_»30-Jun-09 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.