• What do you need help with? Version 5
    5,752 replies, posted
Bucky's videos are okay if you're a novice, but he teaches some pretty bad programming practices, so I'd avoid them if I were you.
What should I do then? Should I use [url]www.cplusplus.com?[/url]
I recommend picking up [URL=http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list]a book[/URL] (C++ Primer is my personal favorite).
Okay, Ill go to [url]www.cplusplus.com[/url] and start learning there! :) Thank you everyone :)
If [url]www.cplusplus.com[/url] is too hard to understand, then look at at [url]www.learncpp.com[/url]. It explains stuff more in depth if you're new to programming.
Hello I am a very novice programmer and I have just gotten into OpenGL and SFML, When I make a window the name of it is always some strange characters. [CODE]sf::Window window(sf::VideoMode(800, 600), "OpenGL"); glEnable(GL_TEXTURE_2D); while (window.isOpen()) { window.setTitle("My Window"); // check all the window's events that were triggered since the last iteration of the loop sf::Event event; while (window.pollEvent(event)) { // "close requested" event: we close the window if (event.type == sf::Event::Closed) window.close(); } }[/CODE] And this is an image of the window. [IMG]http://gyazo.com/ded651ed2d2f1bb35c646339d4abcc92[/IMG] I realize this is not an integral part of programming but I am curious as to what is making it do this, Cheers
[QUOTE=Two-Bit;39288066]Hello I am a very novice programmer and I have just gotten into OpenGL and SFML, When I make a window the name of it is always some strange characters. [CODE]sf::Window window(sf::VideoMode(800, 600), "OpenGL"); glEnable(GL_TEXTURE_2D); while (window.isOpen()) { window.setTitle("My Window"); // check all the window's events that were triggered since the last iteration of the loop sf::Event event; while (window.pollEvent(event)) { // "close requested" event: we close the window if (event.type == sf::Event::Closed) window.close(); } }[/CODE] And this is an image of the window. [IMG]http://gyazo.com/ded651ed2d2f1bb35c646339d4abcc92[/IMG] I realize this is not an integral part of programming but I am curious as to what is making it do this, Cheers[/QUOTE] I just fixed the exact same problem, check out my post: [url]http://facepunch.com/showthread.php?t=1167392&p=39241064&highlight=#post39241064[/url] It has some good answers below.
So now I have to write a program to approximate pi, but I can't get Scheme working for the life of me. Anyone know what I'm doing wrong? [IMG]http://imageshack.us/a/img23/9481/captureqkw.png[/IMG] [code](define (approx-pi n) (piCalc(n 1))) (define (piCalc n k) (+ (piCalc(* (piFunc (/ k n)) (- (/ k n) (/ (- k 1) n)))) (piCalc(* (piFunc (/ k (- n 1)) (- (/ k (- n 1)) (/ (- k 1) (- n 1)))))))) (define (piFunc x) (* 4 (sqrt (- 1 (* x x)))))[/code]
The only thing piFunc is applied to is k/n, not the other factor in the sum
[QUOTE=account;39296549]The only thing piFunc is applied to is k/n, not the other factor in the sum[/QUOTE] But isn't that what I did? I only called piFunc for (k/n), and I left the RHS of the multiplication alone.
-snip- [B]EDIT: Nevermind, I was being stupid and not indenting the if statements. I think it started when I was typing my comment which killed the indentation. [/B]
Your indentation is fucked up. It affects things in Python. Also, [code]elif usersTurn == "N" or userTurn == "n":[/code] is the variable "usersTurn" or "userTurn"?
[QUOTE=ThePuska;39297939]Your indentation is fucked up. It affects things in Python. Also, [code]elif usersTurn == "N" or userTurn == "n":[/code] is the variable "usersTurn" or "userTurn"?[/QUOTE] my bad, it should be userTurn, usersTurn is the True or False variable. Also yeah I messed up the indentation and I know how indentation affects stuff in Python. Thanks for reminding me!
I'm trying to get back into programming as a career again. Can anyone recommend some good introduction/guide to C# PDFs?
[QUOTE=garychencool;39298018]my bad, it should be userTurn, usersTurn is the True or False variable.[/QUOTE] It's usually a very bad idea to have similarly named variables in a file, mainly because of stuff like that happening. Try to avoid it.
[QUOTE=Leonmyster;39296970]But isn't that what I did? I only called piFunc for (k/n), and I left the RHS of the multiplication alone.[/QUOTE] Oh yeah, sorry, I couldn't read it well... Well I think part of the problem is there's no end condition for piFunc, it just keeps recursing
[thumb]http://i.imgur.com/34Gne.jpg[/thumb] I'm having a problem with unity and shaders :< I tried to make foam with the particle system. Something is wrong with the shader (AlphaBlend). As I read it is because unity calculates the distance and decides what to render first. In this case it renders parts of the level before the foam particle. Anyone got an idea on how to fix this?
Anyone got recommendations on where I should go to learn C++? I know C and Objective-C already, so I'd rather have something targeted at existing programmers rather than those with no prior experience. Just something to explain C++'s syntax, how to use it and the "C++" way of doing things so I don't carry over habits from C that I shouldn't. Something targeted at C users would be best. Books or online content, I don't mind.
[url]http://www.learncpp.com/[/url] Better start anew if you don't want to carry any bad habits over [editline]21st January 2013[/editline] But jumping a chapter or two forward on this page wouldn't hurt, I guess.
Hello FP, I really want to learn C# because I heard it's a nice and easy language to start off with, instead of C++ etc. Anyways, are there any good places to learn? I don't want a place with poor information, and out dated information. If you could hook me up with a book, I would be pleased! :) Dario
Doesanyone have a guide on how to get up and running with monogame on opensuse? I have tried compilin gfrom source but get a load of errors, all installers are deb based, and I cant find any repos that have it
[QUOTE=Richy19;39301520]Doesanyone have a guide on how to get up and running with monogame on opensuse? I have tried compilin gfrom source but get a load of errors, all installers are deb based, and I cant find any repos that have it[/QUOTE] Are you having issues compiling Mono? Make sure you've got all the dependencies, etc. As far as I know, MonoGame is entirely a managed project and should run perfectly as long as you've got Mono installed...
Uhh, got rid of most errrs, but how do you set the mouse position in opentk? OpenTK.Input.Mouse.SetPosition doesnt seem to work anymore. And how do you hide cursor?
[QUOTE=Richy19;39301600]Uhh, got rid of most errrs, but how do you set the mouse position in opentk? OpenTK.Input.Mouse.SetPosition doesnt seem to work anymore. And how do you hide cursor?[/QUOTE] There's a workaround by using System.Windows.Forms.Mouse.Position... [url]http://www.opentk.com/node/640[/url] If you're trying to set up an FPS-type camera, I would recommend you grab the latest OpenTK from SVN and use the new input API (OpenTK.Input.Mouse.GetState()) that gives you unaccelerated mouse deltas, which is perfect for an FPS. As for hiding the cursor, I'm not sure if this was part of the OpenTK 1.0 release or added later, but the GameWindow.CursorVisible property works for me on both Windows and Arch Linux. Also with the new input API, there's a lot of stuff still missing (especially on the Mac side) and some stuff that's buggy. If you want to help out with it, try using this version of OpenTK on GitHub and report any errors you notice: [url]https://github.com/andykorth/opentk[/url]
I need help to start a java program with parameters without using the terminal/ command prompt. This is to start a school project with Slick2D and if you set the library path in the main of the java code itself it won't work. I've already done this with a .bat but this doesn't work on linux. Currently my .bat file: [CODE]@echo off java -Djava.library.path=%~dp0native -jar %~dp0AirHockeyClient.jar[/CODE] Is it possible to start a independant process in java because the standard processbuilder/ runtime won't allow a new process, only sub processes that stop if you close the main process.
[QUOTE=ToXiCsoldier;39302752]I need help to start a java program with parameters without using the terminal/ command prompt. This is to start a school project with Slick2D and if you set the library path in the main of the java code itself it won't work. I've already done this with a .bat but this doesn't work on linux. Currently my .bat file: [CODE]@echo off java -Djava.library.path=%~dp0native -jar %~dp0AirHockeyClient.jar[/CODE] Is it possible to start a independant process in java because the standard processbuilder/ runtime won't allow a new process, only sub processes that stop if you close the main process.[/QUOTE] You can replicate your batch file in linux. Head it with [code]#!/usr/bin/env[/code] The java command should be about the same. The file should have .sh as extension, too.
[PHP]Error 15 error LNK1169: one or more multiply defined symbols found F:\Dropbox\Programming\Projects\water game\Debug\water game.exe 1 Error 5 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 9 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 13 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 3 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 7 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 11 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 4 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 8 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 12 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 6 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 10 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 14 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj[/PHP] what the fuck is wrong here? the files it's erroring on don't have any definitions for any of those things [editline]21st January 2013[/editline] basically i need to have some things on a global scope, and to have that happen I wanted to use a new file with a fitting name, but when I included it, it gave me that :c
Are those globals defined as static or extern?
quick question: where should I place main()? Top or bottom of code? [editline]21st January 2013[/editline] Im pretty sure i should place it at the bottom
[QUOTE=Ezhik;39302856][PHP]Error 15 error LNK1169: one or more multiply defined symbols found F:\Dropbox\Programming\Projects\water game\Debug\water game.exe 1 Error 5 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 9 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 13 error LNK2005: "class b2World world" (?world@@3Vb2World@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 3 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 7 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 11 error LNK2005: "class DebugDraw debugDraw" (?debugDraw@@3VDebugDraw@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 4 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 8 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 12 error LNK2005: "class sf::RenderWindow window" (?window@@3VRenderWindow@sf@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj Error 6 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\graphics.obj Error 10 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\physics.obj Error 14 error LNK2005: "struct b2Vec2 gravity" (?gravity@@3Ub2Vec2@@A) already defined in BOX2D IS A PIECE OF SHIT.obj F:\Dropbox\Programming\Projects\water game\water game\water game.obj[/PHP] what the fuck is wrong here? the files it's erroring on don't have any definitions for any of those things [editline]21st January 2013[/editline] basically i need to have some things on a global scope, and to have that happen I wanted to use a new file with a fitting name, but when I included it, it gave me that :c[/QUOTE] If you're using staticly linked libs, you need to add SFML_STATIC in the preprocesser defines.
Sorry, you need to Log In to post a reply to this thread.