Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: CStatusBar Pin
Mark Salsbery4-Jan-08 7:04
Mark Salsbery4-Jan-08 7:04 
GeneralRe: CStatusBar Pin
Mark Salsbery4-Jan-08 7:11
Mark Salsbery4-Jan-08 7:11 
GeneralRe: CStatusBar Pin
vethathiri6-Jan-08 18:46
vethathiri6-Jan-08 18:46 
GeneralRe: CStatusBar Pin
Hamid_RT4-Jan-08 18:15
Hamid_RT4-Jan-08 18:15 
GeneralWindows Console Applications Pin
l_d4-Jan-08 1:36
l_d4-Jan-08 1:36 
GeneralRe: Windows Console Applications Pin
CPallini4-Jan-08 2:52
mveCPallini4-Jan-08 2:52 
GeneralRe: Windows Console Applications Pin
Hamid_RT4-Jan-08 18:16
Hamid_RT4-Jan-08 18:16 
Generalissue Pin
gentleguy4-Jan-08 0:25
gentleguy4-Jan-08 0:25 
dear all

#include <iostream>
using std::cout;
using std::endl;


void printArray(double [][4]);


int main()
{
double a[3][4] = {{0.3,0.4,0.5,0.6},{0.1,0.7,0.8,0.9},{0.11,0.12,0.13,0.14}};

printArray(a);


return 0;
}


void printArray(double a[][4])
{
for (int i = 1; i<=3; i++)
{
for (int j = 1; j j<=4; j++)
cout << a[i][j] << " ";
cout << endl;
}
}

why the result is changed in the end of one row?

thanks

Li Zhiyuan

4/01/2008

GeneralHey man, C++ arrays are 0-based Pin
CPallini4-Jan-08 0:35
mveCPallini4-Jan-08 0:35 
GeneralRe: issue Pin
vibindia4-Jan-08 1:20
vibindia4-Jan-08 1:20 
GeneralWindows 2003 server and Long File Names Pin
vikramlinux4-Jan-08 0:14
vikramlinux4-Jan-08 0:14 
QuestionRe: Windows 2003 server and Long File Names Pin
David Crow4-Jan-08 2:56
David Crow4-Jan-08 2:56 
GeneralRe: Windows 2003 server and Long File Names Pin
vikramlinux4-Jan-08 3:07
vikramlinux4-Jan-08 3:07 
GeneralRe: Windows 2003 server and Long File Names Pin
David Crow4-Jan-08 3:17
David Crow4-Jan-08 3:17 
GeneralRe: Windows 2003 server and Long File Names Pin
vikramlinux4-Jan-08 3:55
vikramlinux4-Jan-08 3:55 
GeneralRe: Windows 2003 server and Long File Names Pin
Dave Kreskowiak4-Jan-08 9:04
mveDave Kreskowiak4-Jan-08 9:04 
GeneralRe: Windows 2003 server and Long File Names Pin
vikramlinux6-Jan-08 20:42
vikramlinux6-Jan-08 20:42 
Questionunable to understand what is the problem? Pin
bankey10104-Jan-08 0:06
bankey10104-Jan-08 0:06 
AnswerRe: unable to understand what is the problem? Pin
Maxwell Chen4-Jan-08 0:22
Maxwell Chen4-Jan-08 0:22 
AnswerRe: unable to understand what is the problem? Pin
CPallini4-Jan-08 0:28
mveCPallini4-Jan-08 0:28 
GeneralRe: unable to understand what is the problem? Pin
bankey10104-Jan-08 0:48
bankey10104-Jan-08 0:48 
GeneralRe: unable to understand what is the problem? Pin
CPallini4-Jan-08 2:58
mveCPallini4-Jan-08 2:58 
AnswerRe: unable to understand what is the problem? Pin
Rajesh R Subramanian4-Jan-08 1:16
professionalRajesh R Subramanian4-Jan-08 1:16 
AnswerRe: unable to understand what is the problem? Pin
David Crow4-Jan-08 2:59
David Crow4-Jan-08 2:59 
GeneralLNK2001 unresolved external symbol Pin
subramanyeswari4-Jan-08 0:02
subramanyeswari4-Jan-08 0:02 

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.