Search:

Type: Posts; User: erald23

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,342

    Errors in the following C program

    Struggling with these errors it seems that most of them are in the same area can't figure out why?


    #include "area.h"#include<stdio.h>
    #include<math.h>




    /* this function calculates the...
  2. Replies
    4
    Views
    4,938

    readPolygon.c(53): warning #810: conversion from...

    readPolygon.c(53): warning #810: conversion from "FILE *" to "int" may lose significant bits
    fgets (record, filepointer);


    readPolygon.c(53): error #165: too few arguments in function call
    ...
  3. Replies
    4
    Views
    4,938

    Need HELP !!! Errors in my fgets function

    Here is the code I have so far, thanks in advance.


    #include "area.h"

    /* this function reads the X- and Y-coordinates of points from a file
    * creates a doubly linked circular list of the...
  4. Replies
    5
    Views
    2,162

    something like this

    do
    122 ;
    123 printf("%lf \t %lf",x,y);
    124 list= list->prev;
    125 } while (list->next !=NULL){
    126
    127
    128
    129 /* list = list->next; list->next */
    130 }
  5. Replies
    5
    Views
    2,162

    Errors in my C program

    void printListReversed(node *list) {113
    114
    115
    116 if (list!=NULL) return;
    117
    118 double x,y;
    119 list = list->next;
    120
    121 do
    122 {
  6. Implement with atoi() to convert ASCII to integer.

    #include <stdio.h>#include <stdlib.h>
    #include <math.h>
    #include "calc.h"
    #define MAXOP 128
    int main(int argc, char *argv[]){

    int type;
    double op2;
    char s[MAXOP];
  7. Thanks very much for trying to help even myself...

    Thanks very much for trying to help even myself don't want you to put the answer because I want to learn. I just want to be directed in the right way since the professor doesn't offer that much help....
  8. First of all I said before I'm new at C...

    First of all I said before I'm new at C programming and that's why I'm asking help , but if you not willing to help or give me at least recommendation, dont do it at all.
    I understand you guys are...
  9. ./cntSort -m 64 -n 1048676 -s2018 Without...

    ./cntSort -m 64 -n 1048676 -s2018

    Without anything on it doesn't show any problems, I just don't know what's going on with the algorithm I created above and have no time I have to turn it in...
  10. The driver code is given from the prof, I cannot...

    The driver code is given from the prof, I cannot touch anything there the problem I'm having is with main.c
  11. I attached the whole program

    I attached the whole program
  12. This is the whole thing I attached the driver...

    This is the whole thing
    I attached the driver also main program that I was trying to create the algorithm.


    / Driver

    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include...
  13. Thank you in advance for helping me, I believe...

    Thank you in advance for helping me, I believe for you guys is something easy but I'm a beginner in C and struggling, I try to do this so far


    for (i=0; i<m-1; i++) {
    count[i];
    temp=...
  14. So what's wrong with my code then if you say...

    So what's wrong with my code then if you say sound about right?
  15. Counting sort assumes the elements are integers...

    Counting sort assumes the elements are integers between 0 and m, and m is much smaller than
    n. For example, let m be 3, and n be 10. Then the elements can be 0, 1, or 2, and we have ten of
    them.
    ...
  16. So what do you suggest to put instead because I'm...

    So what do you suggest to put instead because I'm confused with this error, plus I'm pretty new at C Programming language
  17. I comment out the temp[] still shows the same...

    I comment out the temp[]

    still shows the same error
  18. I get this error Segmentation fault in my program when I run it, and I don't know why

    #include <stdlib.h>
    void cntSort(unsigned m, unsigned n, unsigned data[])
    {
    int i;
    unsigned temp[m];
    unsigned *count;

    /* allocate memory */
    count = (unsigned *)...
  19. Replies
    1
    Views
    4,112

    Need help with this code please

    unsigned int myAdd(unsigned int p, unsigned int q){
    unsigned int mySum;
    /*
    * loop 32 times
    * add a pair of bits from p and q, and the previous carry bit
    * record the sum bit in...
  20. Replies
    11
    Views
    2,381

    sorry I should've said that we are using a driver...

    sorry I should've said that we are using a driver in a separate file and execute them together on emacs to combine them, I'm still working on it and is like this

    #include <stdio.h>#include...
  21. Replies
    11
    Views
    2,381

    ok so this program has two functions the first...

    ok so this program has two functions the first one"void itox" converts interger to hexastring and second one 'int xtoi" converts hexstring to its own value.

    The whole code I have is this and I'm...
  22. Replies
    11
    Views
    2,381

    I did delete printf and now is duplicated the...

    I did delete printf and now is duplicated the error.



    expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
    void itox (char hexstring[], int n)
    ^
    error: expected ‘=’, ‘,’, ‘;’,...
  23. Replies
    11
    Views
    2,381

    /* trying to convert integer to hexa */ even...

    /* trying to convert integer to hexa */
    even other suggestion to shrink down it would be appreciated I feel like is too messy like this



    #include <stdio.h>
    #include <string.h>
    #include...
  24. Replies
    11
    Views
    2,381

    I did as you suggested I put DEFINE YES 1, DEFINE...

    I did as you suggested I put DEFINE YES 1, DEFINE NO 0, and the errors are fixed, but I'm having another error in my void function like this

    expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’...
  25. Replies
    11
    Views
    2,381

    Errors in this function, dont know why

    I need help, I wrote this piece of function and try to compile with gcc this code and it gives me errors like this, I am new at c language still trying to get used to it, any help or suggestions are...
Results 1 to 25 of 32
Page 1 of 2 1 2