Solved

loop through int values

Posted on 2014-09-05
3
169 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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why this code doesn't work? 8 97
Coverting 24 hour time to 12 hour in C++ 15 168
Why does module make constant click noise ? 9 125
Passing a array as parameter - C 2 84
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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now