Strange behavior

This is a discussion on Strange behavior within the C++ Programming forums, part of the General Programming Boards category; Note the following: Code: std::cout<<"X.colNo:"<<X2D.colNo<<" rowNo:"<<X2D.rowNo<<std::endl; std::cout<<"D.colNo:"<<Dp.colNo<<" rowNo:"<<Dp.rowNo<<std::endl; std::cout<<"neig.colNo:"<<Neig.colNo<<" rowNo:"<<Neig.rowNo<<std::endl; distanceScalingOne(X2D, Dp, Neig, X2Df); where Code: void distanceScalingOne(const MatrixRAM& X, ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    43

    Strange behavior

    Note the following:
    Code:
    std::cout<<"X.colNo:"<<X2D.colNo<<" rowNo:"<<X2D.rowNo<<std::endl;
          std::cout<<"D.colNo:"<<Dp.colNo<<" rowNo:"<<Dp.rowNo<<std::endl;
          std::cout<<"neig.colNo:"<<Neig.colNo<<" rowNo:"<<Neig.rowNo<<std::endl;
          distanceScalingOne(X2D, Dp, Neig, X2Df);
    where
    Code:
    void distanceScalingOne(const MatrixRAM& X, const MatrixRAM& D, const MatrixRAM& myX, const MatrixRAM& neig) {
    std::cout<<"X.colNo:"<<X.colNo<<" rowNo:"<<X.rowNo<<std::endl;
    	     std::cout<<"D.colNo:"<<D.colNo<<" rowNo:"<<D.rowNo<<std::endl;
    	     std::cout<<"neig.colNo:"<<neig.colNo<<" rowNo:"<<neig.rowNo<<std::endl;
    }
    and this is the output:
    Code:
    X.colNo:2 rowNo:62
    D.colNo:6 rowNo:62
    neig.colNo:6 rowNo:62
    X.colNo:2 rowNo:62
    D.colNo:6 rowNo:62
    neig.colNo:140221259871064 rowNo:140221243990170
    Any idea why this happens?

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    43
    Ok, I know where is the mistake

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange string behavior
    By jcafaro10 in forum C Programming
    Replies: 2
    Last Post: 04-07-2009, 07:38 PM
  2. strange std::map behavior
    By manav in forum C++ Programming
    Replies: 63
    Last Post: 04-11-2008, 08:00 AM
  3. C++ list Strange Behavior
    By yongzai in forum C++ Programming
    Replies: 19
    Last Post: 12-29-2006, 01:56 AM
  4. strange behavior
    By agarwaga in forum C Programming
    Replies: 1
    Last Post: 10-17-2005, 12:03 PM
  5. Strange behavior with CDateTimeCtrl
    By DonFiasco in forum Windows Programming
    Replies: 2
    Last Post: 12-19-2004, 01:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21