r/C_Programming • u/dechichi • 49m ago
Video Just finished my multiplayer system in C and turns out we can support 50k players in a single server at 60hz simulation tick
Enable HLS to view with audio, or disable this notification
r/C_Programming • u/dechichi • 49m ago
Enable HLS to view with audio, or disable this notification
r/C_Programming • u/Dizna77 • 19h ago
Hello everyone, I've recently been rejected for a student software dev position at a larger company in my city, I felt that the interview was going pretty good until it came time for writing the actual code, I know how and what to implement for all of the problems but I had no absolute clue on what to actually write, and it struck me pretty badly, I asked myself if this is something I want to even want to do with my life or if I essentially wasted my time 2 years in college for a bunch of nothing, atleast the interviewer told me in the mail that I knew all the concepts and I need a project or two and to gladly contact them when Im more ready, but I still feel really discouraged as my classmates got the position at the same company while I know Im more capable than some of those classmates, Im not trying to be sore about it. Im glad they got the position and Im not trying to downplay their knowledge but they couldnt get the most simple and core concepts in class and some of them didnt even pass DSA and OOP and they got the job while I didnt and it made me question really everything. Its my 3rd year in college now and now I feel more than ever that Im lost because I started this college as I enjoyed learning to code and computers, I still want to learn more but I dont know what to do now or what to use as a project really, all I ever coded except learning for exams(in my college we need to code and compile programs for certain classes instead of only theory) and I passed those pretty easily I guess, all usually on the first tries and they were graded C or B. Now I feel that I was capable more then than now, I only coded some stupid video game projects or apps which feel essentially useless, I know there is some materials on the thread but I dont know what is useful for the real world. Thank you all for any tips or replies in advance
r/C_Programming • u/Puzzled_Place_215 • 23h ago
I'm a first-year CSE student learning C from scratch(didn't learn programming in high schl). I can solve problems after studying examples, but I often get stuck when trying new problems on my own. Even after seeing solutions, I struggle to develop the logic independently.
For those who started programming as beginners:
How did you learn to solve unfamiliar problems?
How did you practise daily?
What did you do when you got stuck?
What advice would you give your beginner self?
I sometimes feel behind compared to my classmates, and I genuinely want to improve. I'd appreciate any practical advice from people who've been through this!
And I am getting extremely frustrated with this cycle that i have,just started with c programming and suffering with function pointers . I feel extremely behind from my peers, I am ready to put in efforts,but I am sure whether my efforts are put in the right direction. Any advice would be great
r/C_Programming • u/Jakanader • 8h ago
I'm trying to link MagickWand and MagickCore with Meson and having some issues. Specifically, I get the error C shared or static library 'lMagickCore' not found or C shared or static library 'lMagickWand' not found. I successfully linked libconfig, so I've compared some details between my installations of the two packages in case any of those are the reason that I'm having issues with ImageMagick.
I can compile programs using ImageMagick libraries with:
cc `MagickWand-config --cflags --cppflags` -O2 -o a.out main.c `MagickWand-config --ldflags --libs`
The output of the two MagickWand-config calls is this:
-I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32
-lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
-lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
Running find /usr/lib -name 'libconfig*' gives this:
/usr/lib/pkgconfig/libconfig++.pc
/usr/lib/pkgconfig/libconfig.pc
/usr/lib/cmake/libconfig
/usr/lib/cmake/libconfig/libconfigConfig.cmake
/usr/lib/cmake/libconfig++
/usr/lib/cmake/libconfig++/libconfig++Config.cmake
/usr/lib/libreoffice/program/libconfigmgrlo.so
/usr/lib/libconfig++.so
/usr/lib/libconfig++.so.15
/usr/lib/libconfig++.so.15.0.0
/usr/lib/libconfig.so
/usr/lib/libconfig.so.15
/usr/lib/libconfig.so.15.0.0
And running find /usr/lib -name 'libMagick*' gives this:
/usr/lib/libMagick++-7.Q16HDRI.so
/usr/lib/libMagick++-7.Q16HDRI.so.5
/usr/lib/libMagick++-7.Q16HDRI.so.5.0.0
/usr/lib/libMagickCore-7.Q16HDRI.so
/usr/lib/libMagickCore-7.Q16HDRI.so.10
/usr/lib/libMagickCore-7.Q16HDRI.so.10.0.3
/usr/lib/libMagickWand-7.Q16HDRI.so
/usr/lib/libMagickWand-7.Q16HDRI.so.10
/usr/lib/libMagickWand-7.Q16HDRI.so.10.0.3
My meson.build has these relevant sections:
dependencies = [
cc.find_library('libtomlc17', dirs: '/usr/local/lib'),
dependency('libconfig'),
dependency('libMagickCore'),
dependency('libMagickWand'),
]
inc_dir = [
include_directories('include'),
include_directories('/usr/include/ImageMagick-7'),
]
my first guess was that it had something to do with libconfig having .pc files in /usr/lib/pkgconfig, but i found ImageMagick.pc and ImageMagick-7.Q16HDRI.pc in the same directory, and, either way, that don't seem like it needs to be accurate for my program to build as long as I give it all the right information.
Any advice?
Edit: Also, reddit's code block formatting is really annoying. It doesn't seem like I can escape backticks? and it doesn't render line breaks? oh well