Nicely done, thank you for help.
For the edge cases, I think ASIZE should be 4096+1 or PATH_MAX+1, but I am not sure on this.
Type: Posts; User: ansgar.snow
Nicely done, thank you for help.
For the edge cases, I think ASIZE should be 4096+1 or PATH_MAX+1, but I am not sure on this.
Thank you for help, I've updated the code a bit, but it still has the problem with realpath:
Compiler Explorer
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<fcntl.h>
#include<error.h>
#include<limits.h>
#include<sys/mman.h>
#include<unistd.h>
#include<memory.h>...
This cpp reverseString is just my solution for some codewars.com kata, and the benchmark part is improvised for testing perf against some other solutions using godbolt, so may be not working in your...
Im trying to do the C version of something like that in c++:
#include <string>
#include <bits/stdc++.h>
#include <cstdio>
std::string reverseString (std::string str )
Hey. Thank you for answering and reviewing my code, you made really good points there and i've learn a lot.
I mostly do specialize in scripting languagees so I terribly suck in algo and i don't know...
Im trying to write my custom file encrypter, but the outfile fp2 is empty so I'm doing something wrong here:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#defineSIZE(a)...
I stumble on some simple prime generator implementation in basic C, it was supposed to be something like function returning array of size_t values:
size_t * primeGen(size_t _MAX_)
{
...
#pragma once
#define SIZE(a) sizeof(a) / sizeof(a[0])
#include <stdio.h>
void iter_ints (int arr[])
{
int arrSize = SIZE(arr);
Hey. I am trying to use CLion ide for my C11 Windows projects cause VS is not supporting it, and I have some weird issues with it, I can compile exact same thing with gcc from console but somehow...
Crap, such a obvious mistake and somehow I didnt saw it. Thanks a lot sir.
Hey. Im trying to learn some C basics, I have only some python background and these vogue compiling errors on the silliest things are killing me. Like:
#include <cs50.h>
#include <stdio.h>
...
Hey lads! Im on unix system since like 20yrs now and windows is my true nemesiss, so I have a really hard time while trying to include libssh in my app which has to be built on windows:( "I did...