0% found this document useful (0 votes)
2 views1 page

Makefile and C++ Debugging Fixes

The document discusses errors in a Makefile and prime.cpp file including incorrect indentation, missing separators, type conversion errors, and missing includes and how to fix them by renaming Makefile to have proper indentation, adding -g for debugging, replacing a bool pointer with bool, and adding #include <climits>.

Uploaded by

jha36binayak
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Makefile and C++ Debugging Fixes

The document discusses errors in a Makefile and prime.cpp file including incorrect indentation, missing separators, type conversion errors, and missing includes and how to fix them by renaming Makefile to have proper indentation, adding -g for debugging, replacing a bool pointer with bool, and adding #include <climits>.

Uploaded by

jha36binayak
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

● MakeFile should be renamed to Makefile

● “Makefile:2: *** missing separator. Stop.”. In line 2 there should be proper indentation
● Makefile: -g should be added for debugger to work

1. [Link]: In function ‘bool* is_prime(short unsigned int)’:


[Link]:15: error: cannot convert ‘bool’ to ‘bool*’ in assignment

15 | replaced the pointer with bool, since its easy and also its unnecessary to use pointer in
bool

2. Added #include <climits> to fix error:


a. ‘INT_MAX’ was not declared in this scope 36 | int arr[INT_MAX - n];

You might also like