| | |
Arrays and for loops
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Mar 2007
Posts: 50
Reputation:
Solved Threads: 2
•
•
•
•
Replace the round brackets with square ones [] and you are good to go...Oh and btw it would be a good idea to initialize your arrays.
i have tried to change it
int i;
double D_Nath[11],D[11],er[11];
for( i=0;i < 11; i++)
{
D_Nath(i)=PI*D(i)/er(i)*.76554;
}
this is what I have for the code but I am getting a C2064 error in the line with the D_Nath(I)=
any idea what I am doing wrong
•
•
•
•
i have tried to change it
int i;
double D_Nath[11],D[11],er[11];
for( i=0;i < 11; i++)
{
D_Nath(i)=PI*D(i)/er(i)*.76554;
}
this is what I have for the code but I am getting a C2064 error in the line with the D_Nath(I)=
any idea what I am doing wrong
You forgot to change the () for [] inside statement inside the loop
![]() |
Similar Threads
- arrays in java!!! (Java)
- C++ file to array (C++)
- Help with efficient memory management (C)
- Arrays (C++)
- How do you increment arrays in for loops? (Java)
- New Programmer (aspiring) (C++)
- hangman revised (VB.NET)
- Please help me with arrays (C++)
- sorting parallel arrays (C)
- Arrays (C++)
Other Threads in the C++ Forum
- Previous Thread: password input
- Next Thread: Waitkey command
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node output parameter pointer problem program programming project proxy python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






