Salem,
Is there any way of putting your linked list code directly in main()? Either that or making it a function that gets called directly from main()? I see the list append function (which is the...
Type: Posts; User: dbyte
Salem,
Is there any way of putting your linked list code directly in main()? Either that or making it a function that gets called directly from main()? I see the list append function (which is the...
Zainny,
Your code works fine, but is this part the linked list?
for (i = 0; i < 5; i++) {
if (i == 4) {
employees[i]->next = NULL;
} else {
...
Here is my code:
#include <stdio.h>
#include <stdlib.h>
/*Structure declaration*/
struct employee
{
char name[20];
Okay, finally got the (altered) code working:
#include <stdio.h>
#include <string.h>
void subb()
{
int r;
int t;
Elite,
Below your # include statements you initialize the function as "sub", but everywhere else in your code it's referred to as "subb". I'm not sure if this is the reason for your specific error...
Salem,
You rule!
Thanks for you help. More importantly, thanks for your clear explanations. I like it a lot better when I can learn why things are done instead of merely knowing that they are...
Blackrat,
Okay, I removed the loop from main(). Code still compiles fine but crashes during running, @ the same point as before. Here is my updated code for main:
int main ()
{
...
LP,
Thanks for your quick reply. I'm using the Dev-C++ 4.9.8.0 IDE on a Windows XP laptop. I have used the system("pause") bit in all of my previous code without it causing any problems. Maybe it...
Here is my code:
#include <stdio.h>
/*Structure declaration*/
struct employee
{
long id_number;
float wage;
Got it - thanks for the clarification.
Money?,
Thanks for your help. I made the changes you indicated & everything works as it should. A question though: why is the transpose function supposed to be set to void? Isn't it returning the...
The first row & column are zero-filled to prevent me from having to include "- 1" in every instance of the array loops. Hence the larger arrays for a smaller set of values. Probably not the...
Here is my code:
#include <stdio.h>
#define count 6
int transpose (int row[], int column[], int number[][6])
{
number[row[count]][column[count]] = number[column[count]][row[count]];
Salem & Draco,
Thanks for helping out yet another newB guys. I made the settings changes and removed the '&' - VOILA! I actually have working code!!:D
I'll be back here asking questions again...
Here is my code:
#include <stdio.h>
main ()
{
char letter;
printf ("Enter a letter: ");