Issue I am trying to build a C program inside a Docker container, I just would like to create a binary file and execute it in the container. I receive no error during compilation but when running within my container
Continue readingTag: c
[SOLVED] Edges on polygon outlines not always correct
Issue I’m using the algorithm below to generate quads which are then rendered to make an outline like this http://img810.imageshack.us/img810/8530/uhohz.png The problem as seen on the image is that sometimes the lines are too thin when they should always be
Continue reading[SOLVED] Power by squaring for negative exponents
Issue I am not sure if power by squaring takes care of negative exponent. I implemented the following code which works for only positive numbers. #include <stdio.h> int powe(int x, int exp) { if (x == 0) return 1; if
Continue reading[SOLVED] How do "inner" and "outer" work in this bubble sort code?
Issue I am trying to learn the bubble sort algorithm in a book for C. I can’t seem to understand in the code below how int outer and int inner link to which element of the nums array. Like how
Continue reading[SOLVED] Issues running WinMain in C
Issue Currently I’m having issues with WinMain in C (specifically in Visual Studio). For instance… #include <stdio.h> #include <Windows.h> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) { return(0); } 1>—— Build started: Project: GameB, Configuration: Debug x64 ——
Continue reading[SOLVED] Change colour of specific characters in string in C
Issue Say I have some ASCII art in string presented as a variable as follows: char LOGO[3][40] = { " /$$ /$$ ", " | $$ |__/ ", " /$$$$$$ /$$/$$$$$$$ /$$ /$$ ", I want to specifically show the
Continue reading[SOLVED] accept fills client's IP as "::"
Issue I start a server on :: to accept all possible connections. void StartServer(std::string ip, unsigned int port) { union sockaddr_types { struct sockaddr_storage storage; struct sockaddr addr; struct sockaddr_in in4; struct sockaddr_in6 in6; }; sockaddr_types address_storage = {}; if
Continue reading[SOLVED] Initializing array members in for loop causes silent program termination?
Issue When trying to initialize charInfo[] via a for loop of any amount of iterations (or any loop for that matter), the program terminates unexpectedly with no indication of why. #include <stdlib.h> #include <windows.h> int main(){ //Create handle for screen
Continue reading[SOLVED] Object rendering strangely after adding transformations
Issue I’m adding transformations to my C OpenGL program. I’m using CGLM as my maths library. The program has no warnings or errors. Still however, when I compile and run the program, I get a distorted version of my intended
Continue reading[SOLVED] In PDF, if Encoding and ToUnicode are both present in PDF, how to map the text extraction?
Issue I used qpdf to uncompress a PDF file and below is the output. You can see that there both, encoding and ToUnicode, are present. If there is only ToUnicode I know how to map individual characters with Cmap file.
Continue reading