Click here to Skip to main content
15,887,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Using Class Template in Visual C++ Pin
Stuart Dootson30-Jun-09 2:39
professionalStuart Dootson30-Jun-09 2:39 
GeneralRe: Using Class Template in Visual C++ Pin
emira6730-Jun-09 2:48
emira6730-Jun-09 2:48 
GeneralRe: Using Class Template in Visual C++ Pin
Stuart Dootson30-Jun-09 2:52
professionalStuart Dootson30-Jun-09 2:52 
Questionerror in starting widows service after installation Pin
Subrat Patnaik30-Jun-09 0:46
Subrat Patnaik30-Jun-09 0:46 
AnswerRe: error in starting widows service after installation Pin
Cedric Moonen30-Jun-09 0:58
Cedric Moonen30-Jun-09 0:58 
GeneralRe: error in starting widows service after installation Pin
Chuck O'Toole30-Jun-09 22:57
Chuck O'Toole30-Jun-09 22:57 
GeneralRe: error in starting widows service after installation Pin
Subrat Patnaik1-Jul-09 0:54
Subrat Patnaik1-Jul-09 0:54 
GeneralRe: error in starting widows service after installation Pin
Cedric Moonen1-Jul-09 0:56
Cedric Moonen1-Jul-09 0:56 
QuestionDoubt in MapMode Pin
KASR129-Jun-09 23:34
KASR129-Jun-09 23:34 
AnswerRe: Doubt in MapMode Pin
led mike30-Jun-09 4:34
led mike30-Jun-09 4:34 
Questionwmi problem Pin
Mogaambo29-Jun-09 23:03
Mogaambo29-Jun-09 23:03 
QuestionIOCTL codes Pin
AnayKulkarni29-Jun-09 21:07
AnayKulkarni29-Jun-09 21:07 
AnswerRe: IOCTL codes Pin
Cedric Moonen29-Jun-09 22:21
Cedric Moonen29-Jun-09 22:21 
AnswerRe: IOCTL codes Pin
Roger Stoltz30-Jun-09 1:25
Roger Stoltz30-Jun-09 1:25 
QuestionCMYK values Pin
S p k 52129-Jun-09 20:56
S p k 52129-Jun-09 20:56 
AnswerRe: CMYK values Pin
Nuri Ismail29-Jun-09 21:19
Nuri Ismail29-Jun-09 21:19 

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.