Click here to Skip to main content
15,909,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to set inlude of option? Pin
CPallini5-Jan-08 0:11
mveCPallini5-Jan-08 0:11 
GeneralRe: how to set inlude of option? Pin
gentleguy5-Jan-08 1:17
gentleguy5-Jan-08 1:17 
GeneralRe: how to set inlude of option? Pin
CPallini5-Jan-08 1:30
mveCPallini5-Jan-08 1:30 
GeneralRe: how to set inlude of option? Pin
gentleguy5-Jan-08 1:39
gentleguy5-Jan-08 1:39 
GeneralRe: how to set inlude of option? Pin
CPallini5-Jan-08 4:22
mveCPallini5-Jan-08 4:22 
GeneralRe: how to set inlude of option? Pin
gentleguy5-Jan-08 1:44
gentleguy5-Jan-08 1:44 
GeneralRe: how to set inlude of option? Pin
gentleguy5-Jan-08 1:47
gentleguy5-Jan-08 1:47 
GeneralRe: how to set inlude of option? Pin
David Crow5-Jan-08 4:33
David Crow5-Jan-08 4:33 
What you have here is a big ol' mess. Why have you duplicated the code in both the .h and .cpp files? Put the class declaration in the .h file like:

class Centroids
{
public:
    void printArray( double a[3][4] );
};
Then put its definition in the .cpp file like:

#include "centroids.h"
 
void Centroids::printArray( double a[3][4] )
{
    using namespace std; // there's no need for twelve separate statements
 
    for (int i = 0; i < 3; i++)
    { 
        for (int j = 0; j < 4; j++)
            cout << setw(3) << setprecision(6) << setiosflags(ios::fixed | ios::showpoint) << a[i][j] << " ";
 
        cout << endl;
    }
}
li zhiyuan wrote:
int number = 1;

for (int number = 1;


Why do you have number declared twice?

"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


JokeRe: how to set inlude of option? Pin
CPallini5-Jan-08 4:35
mveCPallini5-Jan-08 4:35 
GeneralRe: how to set inlude of option? Pin
gentleguy6-Jan-08 0:07
gentleguy6-Jan-08 0:07 
GeneralAVCODEC Pin
Girish Kumar4-Jan-08 22:24
Girish Kumar4-Jan-08 22:24 
GeneralConvert Date to EXCEL Numeric Pin
im_hoser4-Jan-08 21:10
im_hoser4-Jan-08 21:10 
GeneralRe: Convert Date to EXCEL Numeric Pin
CPallini5-Jan-08 0:50
mveCPallini5-Jan-08 0:50 
GeneralProbelm in calling ActiveX VB dll Pin
manoharbalu4-Jan-08 19:35
manoharbalu4-Jan-08 19:35 
Generalurgent help Pin
gentleguy4-Jan-08 19:22
gentleguy4-Jan-08 19:22 
QuestionRe: urgent help Pin
CPallini4-Jan-08 23:09
mveCPallini4-Jan-08 23:09 
GeneralRe: urgent help Pin
gentleguy5-Jan-08 1:20
gentleguy5-Jan-08 1:20 
GeneralRe: urgent help Pin
Joan M5-Jan-08 2:14
professionalJoan M5-Jan-08 2:14 
QuestionProblem with using SENS and the COM Event System in VC++ Pin
ashishbhatt4-Jan-08 17:40
ashishbhatt4-Jan-08 17:40 
GeneralRe: Problem with using SENS and the COM Event System in VC++ Pin
David Crow4-Jan-08 17:50
David Crow4-Jan-08 17:50 
GeneralRe: Problem with using SENS and the COM Event System in VC++ Pin
ashishbhatt4-Jan-08 18:12
ashishbhatt4-Jan-08 18:12 
QuestionHow to get local ip address Pin
shakumar_224-Jan-08 17:18
shakumar_224-Jan-08 17:18 
AnswerRe: How to get local ip address Pin
David Crow4-Jan-08 17:46
David Crow4-Jan-08 17:46 
AnswerRe: How to get local ip address Pin
Hamid_RT4-Jan-08 18:01
Hamid_RT4-Jan-08 18:01 
Generalupgrading dbghelp.dll Pin
DevMentor.org4-Jan-08 9:20
DevMentor.org4-Jan-08 9:20 

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.