-
Posts
1,196 -
Joined
Content Type
Forums
Status Updates
Blogs
Events
Gallery
Downloads
Store Home
Everything posted by fizzlesticks
-
I just followed the quick start section on the github page then googled if I couldn't figure something out. There is no linking to VS, the program edits some internal VS files to make things available in any project (if you did the integrate step in the guide.) vcpkg install sdl2 curl installs the 32bit dynamically linked versions of the libraries so make sure your project is set to x86 if you want to get the 64 bit version use vcpkg install sdl2:x64-windows and for statically linked (if the library supports it, I don't know if sdl or curl do) vcpkg install sdl2:x86-windows-static for 32bit or vcpkg install sdl2:x64-windows-static for 64bit After installing you should be able to just #include <SDL2/sdl.h> and everything should work automatically.
-
For using 3rd party libraries like SDL in Visual Studio you can use VCPKG. You tell it which version of the library to install (32 or 64 bit, static or dynamically linked) and it will automatically download, build and add the proper compiler and linker options for you to use the libraries in your projects. Not every library will be available but a ton are.
-
Visual Studio's compiler doesn't support standard C and it never will. If you want to write straight C code you shouldn't be using VS.
- 10 replies
-
- c
- visual studio
- (and 4 more)
-
SDL Open GL C++ Entry point fatal error LNK1561 Visual Studio 2017
fizzlesticks replied to a topic in Programming
Nope, I just used the docs when I was messing around with it. -
SDL Open GL C++ Entry point fatal error LNK1561 Visual Studio 2017
fizzlesticks replied to a topic in Programming
This is a problem with the SDL library. SDL defines its own entry point so must either tell VS where that entry point is by setting the subsystem to console then in project properties > linker > advanced, setting the entry point to whatever SDL calls its main function (I can't remember the name sorry.) Or add a define for SDL_MAIN_HANDLED before #including SDL.h to tell SDL you want to use your own entry point. -
The algorithm you're looking for is called "rotate", unfortunately Python doesn't have a built in function for it but it should be easy to implement after a quick google.
-
C Program Compiles but Segfaults [Commented Code]
fizzlesticks replied to LtStaffel's topic in Programming
http://en.cppreference.com/w/c/string/byte/strtol probably, but I'm not really into C so someone else might know better. -
C Program Compiles but Segfaults [Commented Code]
fizzlesticks replied to LtStaffel's topic in Programming
int limit = (int)argv[1]; argv is an array of "strings", you can't just use a cast to get the int value. -
Using python to access a specific value in JSON
fizzlesticks replied to Coaxialgamer's topic in Programming
The requests library has a built in JSON thingy. a=requests.get(url) print(a.json()) -
SOLVED - C# index was outside the bounds of the array? - SOLVED
fizzlesticks replied to a topic in Programming
for (int i = 0; i < studentStringNames.Length || found; i++) { if (nameSearchingFor.Equals(studentStringNames[i])) //This is the line where the error is showing up. { found = true; OutputBox.Text = studentNumberGrades[i].ToString(); } else { OutputBox.Text = "Student Not Found."; } } If the name you're searching for is in the list you set found to true which makes the condition of the for loop i < studentStringNames.Length || true which is always true, giving you an infinite loop. -
Please post the code as text, not a screen shot. It makes it much easier to help.
-
If going the .upper() or .lower() route, you should use .casefold() instead. It converts to lowercase but works better for certain unicode characters.
-
Advent of Code A new programming challenge every day from now until Christmas.
-
Find out what language your school uses for their beginner classes and start learning that.
-
IDLE and ITE not showing up in win 10 (Python)
fizzlesticks replied to gabiz4lyf's topic in Programming
Is your Python installed in a directory that has a space anywhere in the path? -
PyCharm or Visual Studio.
-
Using "std::cin >> " will only read up to the first whitespace character. To read an entire line you should use std::getline(cin, string) which will by default read up to a newline character but you can also set whatever delimiter you want.
-
Assigning Command Line Floats to Variables (C)
fizzlesticks replied to FaiL___'s topic in Programming
You convert argv[2] to an int using atoi then compare them. -
Assigning Command Line Floats to Variables (C)
fizzlesticks replied to FaiL___'s topic in Programming
argv[2] is a char* and you're trying to compare it to an int, that doesn't work. -
Assigning Command Line Floats to Variables (C)
fizzlesticks replied to FaiL___'s topic in Programming
printf("%f", &numberTwo); You're passing the address of the float, not the float. Get rid of the &. Same goes for all the other printfs you have. -
The first one just returns a function object, the second one actually calls that function object. But since you don't use the arguments at all you should just do strat_map = { '1': lambda: print('One'), '2': lambda: print('Two') } strat_map['1']() strat_map['2']()
-
Prints a char normally, but full string when debugged.
fizzlesticks replied to Tech N Gamer's topic in Programming
Yup tried that. Are you able to reproduce the bug by just calling that 1 function with a hardcoded string? -
Prints a char normally, but full string when debugged.
fizzlesticks replied to Tech N Gamer's topic in Programming
Most people don't like downloading random files posted online. Go ahead and do that, I tried the function you posted and it seems to work fine for me both while debugging and not. -
Prints a char normally, but full string when debugged.
fizzlesticks replied to Tech N Gamer's topic in Programming
Please copy/paste the code into your post using code tags. -
That will gives the last element, not the last valid character in the array. And to answer OP, use a string not an array.