Solved

loop through int values

Posted on 2014-09-05
3
171 Views
Last Modified: 2014-09-06
#include <stdio.h>
#include <string.h>

main()
{
	int A[] = { 2, 4, 5, 8, 1 };
	int j;
	int valueAj;
	for (j = 0; j<5; j++)
	{
		valueAj = A[j];
       }

Open in new window



for another example, I want to know why the visual studio express is saying
            valueAj = A[j];
is an error


I do not want new code to solve a loop problem
I want to know or modify this code to work.
0
Comment
Question by:rgb192
3 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 250 total points
ID: 40307120
It seems like you missed a closed brace
0
 
LVL 9

Assisted Solution

by:macarrillo1
macarrillo1 earned 250 total points
ID: 40307134
Is there a closing brace for main()?

As in :

main ()
{


}<-----Here

I see the closing brace for the for loop.
0
 

Author Closing Comment

by:rgb192
ID: 40307662
closing brace

Thanks.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My eclipse editor won't start ? 4 162
Problem to ASCII 1 197
Test the speeds on my PC Drives 12 63
placing a checked in the checklistbox based on the value in database table. 3 23
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question