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...
Type: Posts; User: erald23
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...
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
...
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...
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 }
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 {
#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];
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....
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...
./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...
The driver code is given from the prof, I cannot touch anything there the problem I'm having is with main.c
I attached the whole program
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...
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=...
So what's wrong with my code then if you say sound about right?
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.
...
So what do you suggest to put instead because I'm confused with this error, plus I'm pretty new at C Programming language
I comment out the temp[]
still shows the same error
#include <stdlib.h>
void cntSort(unsigned m, unsigned n, unsigned data[])
{
int i;
unsigned temp[m];
unsigned *count;
/* allocate memory */
count = (unsigned *)...
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...
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...
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...
I did delete printf and now is duplicated the error.
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
void itox (char hexstring[], int n)
^
error: expected ‘=’, ‘,’, ‘;’,...
/* 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...
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__’...
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...