Skip to content

Commit

Permalink
remove stdint.h dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kvedala committed Apr 8, 2020
1 parent d5143ff commit 66ef12d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project_euler/Problem 08/sol1.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long long int get_product(FILE *fp, long start_pos, int num_digits)
{
char ch = ' '; /* temporary variable to store character read from file */
uint8_t num = 0; /* temporary variable to store digit read */
unsigned char num = 0; /* temporary variable to store digit read */
long long int prod = 1; /* product accumulator */
int count = 0; /* we use this variable to count number of bytes of file read */

Expand Down
5 changes: 2 additions & 3 deletions project_euler/Problem 08/sol2.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h> /* for memmove */

int main(int argc, char *argv[])
{
int position = 0, num_bad_chars = 0;
int num_digits = 4;
char ch;
uint8_t num, num_prev;
uint8_t *buffer = NULL;
unsigned char num, num_prev;
unsigned char *buffer = NULL;
long long int prod = 1, max_prod = 0;

/* if second command-line argument is given,
Expand Down

0 comments on commit 66ef12d

Please sign in to comment.