Search:

Type: Posts; User: bigparker

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    2,236

    oh ok i attempted to use this while((j =...

    oh ok i attempted to use this



    while((j = fscanf(pfile, "%d", &num)) !=EOF){
    data_in[i] = num;
    i++;
    }
  2. Replies
    14
    Views
    2,236

    oh ok...I got that straight...it was because I...

    oh ok...I got that straight...it was because I had MAX set to a value greater than the number of integers in my input file...
  3. Replies
    14
    Views
    2,236

    thanks...that got rid of the seg fault. Do you...

    thanks...that got rid of the seg fault. Do you guys have any idea of why the the program would only print the last value in my input file? its prints 421 repeatedly...



    # define MAX 1000...
  4. Replies
    14
    Views
    2,236

    Not to seem basic, but how do i test to be sure...

    Not to seem basic, but how do i test to be sure that i dont run past the end of my buffer?
  5. Replies
    14
    Views
    2,236

    int main(){ printf("Cake"); int data_in[100];...

    int main(){
    printf("Cake");
    int data_in[100];
    FILE *pfile;
    pfile = fopen("input.txt", "r");
    int i=0;

    int num=0;

    do{
  6. Replies
    14
    Views
    2,236

    int main(){ printf("Cake"); int data_in[100];...

    int main(){
    printf("Cake");
    int data_in[100];
    FILE *pfile;
    pfile = fopen("input.txt", "r");
    int i=0;
    int k=0;
    int num=0;

    do{
  7. Replies
    14
    Views
    2,236

    I have no other function in the program. I broke...

    I have no other function in the program. I broke up all of my declarations and initialized all the variables to zero, but the seg fault is still there...
  8. Replies
    14
    Views
    2,236

    Segmentation Fault

    Can someone help me figure out why I am getting a seg fault at run time...





    #include <stdio.h>
    #include <stdlib.h>
Results 1 to 8 of 8