Search found 164 matches

by Nokurn
Tue Nov 22, 2016 6:37 pm
Forum: Programming Discussion
Topic: error: ‘snprintf’ was not declared in this scope
Replies: 2
Views: 7961

Re: error: ‘snprintf’ was not declared in this scope

Are you using C or C++? Your includes are for C headers (with a C++ header commented out). In your makefile, you're using KOS_CC, which should be a C compiler (vs. KOS_CXX), but you're linking with the C++ standard library (-lstdc++). If you're using C++ you might want to try std::snprintf instead (...
by Nokurn
Tue Aug 25, 2015 5:06 pm
Forum: Programming Discussion
Topic: The most annoying bug in the world
Replies: 2
Views: 7886

Re: The most annoying bug in the world

I've seen this one before. That's the UTF-8 encoding of a "punctuation space" (U+2008). Totally invisible but... unless you're expecting it to be there, it'll ruin your afternoon :twisted:
by Nokurn
Tue Jul 28, 2015 12:27 pm
Forum: Programming Discussion
Topic: Passing a Pointer as a Reference, Deallocating SDL2 objects
Replies: 7
Views: 12229

Re: Passing a Pointer as a Reference, Deallocating SDL2 obje

In this context, using a reference to a pointer is somewhat senseless, possibly even unsafe, unless you intend to assign the render variable inside CreateTexture and want the new value to apply to the render variable inside main. When using a library written in C, the objects won't destruct when the...
by Nokurn
Sat Jul 11, 2015 3:31 pm
Forum: Programming Discussion
Topic: Exceptions
Replies: 7
Views: 12212

Re: Exceptions

I don't think it's practical to use the bulk of the STL without exceptions. It was designed for use with exceptions and most implementations are written with this in mind. Any flags to disable their use are hacks and will always have some issues. The EASTL specification suggests several alternative ...
by Nokurn
Sat Jul 11, 2015 1:12 pm
Forum: Programming Discussion
Topic: Exceptions
Replies: 7
Views: 12212

Re: Exceptions

A note on your proposed solution: use custom allocators everywhere(which you propably do anyway) and accept the fact that the only reasonable action on allocation failure is to optionally log/throw some violent insult at the perpetrator and then abort everything In C, there are three schools of thou...
by Nokurn
Sun Feb 02, 2014 4:39 pm
Forum: Programming Discussion
Topic: Structs? Unions? Classes?
Replies: 5
Views: 5533

Re: Structs? Unions? Classes?

classes and structs are very similar. unions are entirely different from both. Your book is correct in that members of classes default to private, while members of structs default to public. Why not just use classes? It can be useful to give further meaning to structs for the sake of organizing your...
by Nokurn
Thu Dec 26, 2013 8:18 pm
Forum: General Gaming
Topic: Post every time you beat a game.
Replies: 629
Views: 893894

Re: Post every time you beat a game.

Dust: An Elysian Tail. It's a 2D action RPG with INCREDIBLE graphics and very addictive combat. It was made, for the most part, by one guy, as his first foray into game development after a career of film animation, using XNA. I got it on sale a few weeks ago, let it sit in my library, decided to try...
by Nokurn
Tue Nov 26, 2013 10:14 pm
Forum: Game Development
Topic: What projects are you currently working on?
Replies: 500
Views: 186462

Re: What projects are you currently working on?

I'm working my way through the Project Euler problems. Right now, I'm writing them in C, though I might try my hand at solving them using something functional, possibly Haskell or a Lisp, since the problems are intended as learning exercises. I'm on problem 11 after an hour or so of work, most of wh...
by Nokurn
Tue Sep 24, 2013 12:09 pm
Forum: General/Off-Topic
Topic: The meaning of Lorem Ipsum
Replies: 2
Views: 4977

Re: The meaning of Lorem Ipsum

"You can help the force."
Are you sure it's confused?
by Nokurn
Mon Aug 26, 2013 8:29 am
Forum: Programming Discussion
Topic: What Does This Code Do?
Replies: 3
Views: 4049

Re: What Does This Code Do?

I am not sure I see what you mean. This code produces an error in C++98/03, since it uses an initializer list, but compiles and executes correctly in C++11: Jeremiah@mercury:~/Desktop% cat myStrings.cpp #include <iostream> #include <string> int main() { std::string* myStrings = new std::string[4] { ...
by Nokurn
Mon Aug 26, 2013 1:00 am
Forum: General Gaming
Topic: New Box
Replies: 11
Views: 13479

Re: New Box

I'm not really aware of the current situation on the hardware market but I can give you some general advices: 1.) Your CPU has a built in GPU. If you don't need it, you should take one without it and save money. Or is it already common to have CPU/GPU hybrids? 2.) You should not save money on the h...
by Nokurn
Sun Aug 25, 2013 3:16 am
Forum: Game Development
Topic: C++ or C#?
Replies: 8
Views: 6029

Re: C++ or C#?

Well that's a real bummer. I guess it won't be hard to go back to C++ but that means I'm going to have to re-write my whole game... Would it be ok to stick with SDL for C++ then? I already know a little bit of SDL. If you have a game going already, don't rewrite it. It's more important to finish it...
by Nokurn
Sat Aug 24, 2013 11:01 pm
Forum: Game Development
Topic: C++ or C#?
Replies: 8
Views: 6029

Re: C++ or C#?

What do you mean by "no longer supported"? I heard that they don't update XNA anymore but that just means that it won't be updated for future gaming technology, or so I thought. The newest version of XNA (4.0) is all I would really need to make a 2d Side Scroller. Correct me if I'm wrong....
by Nokurn
Wed Aug 21, 2013 6:17 pm
Forum: General/Off-Topic
Topic: Where did it all begin for you?
Replies: 45
Views: 30067

Re: Where did it all begin for you?

After that it was all downhill. I'm almost 19 now, and I don't think I've gone a week without writing code since I started. Haha, I remember when I would first learn a new language I would print "Goodbye World!" instead for that very reason. #include <stdio.h> int main(int argc, char** ar...
by Nokurn
Wed Aug 21, 2013 9:21 am
Forum: General/Off-Topic
Topic: Where did it all begin for you?
Replies: 45
Views: 30067

Re: Where did it all begin for you?

I started programming in C when I was 9. After about 6 months I started using C++ on the side, but I mainly used C for the first few years. I picked up PHP at some point, which led to me writing some rudimentary DOS programs in machine code (writing binaries in hex and converting them using a PHP sc...