It's 1:30 here as well. I've been searching the internet for tuts since about 8, but I learn more from seeing the code in action rather than just reading the basics in some tut.
As I said, I'll...
Type: Posts; User: Alan Gott
It's 1:30 here as well. I've been searching the internet for tuts since about 8, but I learn more from seeing the code in action rather than just reading the basics in some tut.
As I said, I'll...
Don't pointers take two locations and combine them? Or something of that sort.
EX:
a | location 1
--------|
|
--------|
ptr = &a| location 1
I'm hoping to figure out how pointers work, so I'll probably just ask my professor since some help here rather make people feel foolish rather than actually try to help... Thanks for your input, and...
I do understand functions and scoping, what I don't understand is how pointers are used and how they work...
When you throw pointers in, without fully explaining them to someone who knows nothing...
A simple "look up a tutorial" would have sufficed instead of being a tad arrogant. I know, and admit often, that I don't understand everything people tell me on here. Just because I don't understand...
I can assure you that it did... Video - TinyPic - Free Image Hosting, Photo Sharing & Video Hosting <- Video of it working as I said.
And as for CommonTater's suggestion, is there a link to a...
I'm not too keen on a lot of the technical stuff when it comes to building and compiling, but I'd have to say gcc just from a quick look.
imgur: the simple image sharer
In display_array, everything got printed correctly (see the first image in this link <Photo Album - Imgur>), which is why I am having trouble understanding what I need to do differently.
EDIT:
...
How was I able to access it in display_array then, and how am I able to return two things, as I have never done that as of yet.
BUMP? I feel as though I am so close, yet so far from finally understanding why this isn't working.
If what you are asking is for a way for the loop to end, how about changing it to a do-while loop, or something, where it asks the user if he/she wants to repeat it.
EX:
do{
//code here...
if (var == ':')
fscanf (in, "&d", &lab[MAX]);
Well this part here might be why. First off, I have no idea, since I must be less knowledgeable than you in C atm, what the first part is...
Well, I have to use MSVC++ for my lab, so I have to keep in standards with C-89 since MSV doesn't like the new standards. As I said, I am a novice still and I was just trying to help in whatever way...
Try taking "&" out of this, so you will have...
printf ("%d",lab[1]);
First off,I would declare i at the beginning of the function instead of the in the for statement, so you would only be left with "i = 0" in the for statement instead of "int i = 0".
Then, what...
If you have the positive and negative numbers in separate arrays, then wouldn't you just use a for-loop and display all of the integers stored in it? (It might be helpful if you posted your code so I...
In order for anyone to help, you have to have some work done. Do as much as you can, and when stumped on a specific spot, ask for help.
Ok, well I knew that much then, I just didn't know the technical way of saying it. I guess my problem is not understanding how structs fit into that. Why is it that I can use fill_array to store data...
Yep, each 'slot' of the array can hold a value. (Excluding strings which need a 'slot' per character.)
Do you know what a do-while loop is?
Here is the tut from this website, if you find it hard to understand for whatever reason, I'll try to explain to you what it is to the best of my limited...
I noticed, and changed, that in line 25 didn't I? (It might have been after you read it and before you posted this).
I am not sure what you mean here, I still only have limited knowledge on...
I know what a global varaible is, but I am not sure what you mean by declaring it static.
What's wrong with that? Doesn't it add the next variable in the array to average _wage in each loop?
Source
#include <stdio.h>
int fill_array(void);
int display_array(int count);
typedef struct
Well, that would have been good to know at the beginning of the semester lol.
But now that that one was a rather simple solve, my older ones are still having compile errors. ;(
EDIT: NVM, it...
Wow, that did it lol. So I can't even have a function that is independent from the rest of the code used before declaring my variables?