Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

loop through int values

Posted on 2014-09-05
3
Medium Priority
?
177 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 1000 total points
ID: 40307120
It seems like you missed a closed brace
0
 
LVL 9

Assisted Solution

by:macarrillo1
macarrillo1 earned 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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 opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

783 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