• What do you need help with? Version 5
    5,752 replies, posted
[QUOTE=Gulen;38977295]Get a new book. After reading about ansi.sys on wikipedia, it seems like a totally useless file (it adds some colours, macros and different video modes to CMD) It seems like the book should be able to teach you about functions without this file (mine did)[/QUOTE] As far as I know, ansi.sys and config.sys/.nt are leftovers from MSDOS, and as such would probably still be there in XP. Not sure how that ties in with C++, though. If you want colored text in console, have a look at [url]http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047%28v=vs.85%29.aspx[/url] - note that this only works on Windows. Also, cmd.exe is not the same as command.com.
Maybe I should try this book on my Windows XP
[QUOTE=Cesar Augusto;38977999]Maybe I should try this book on my Windows XP[/QUOTE] Can you give some more details about what you need to do with ansi.sys and config.nt? Maybe we can give some (up to date) alternatives to what you're supposed to do. [editline]26th December 2012[/editline] I understand you'll want to follow the book, but it's no use learning something that is outdated or might not even work anymore.
[QUOTE=Cesar Augusto;38974199]I'm not ignoring, sorry. It's a portuguese C++ book. I'm now in the functions chapter that show about this[/QUOTE] portuguese C++ is really outdated and non-intuitive, i suggest english c++
[QUOTE=horsedrowner;38978022]Can you give some more details about what you need to do with ansi.sys and config.nt? Maybe we can give some (up to date) alternatives to what you're supposed to do. [editline]26th December 2012[/editline] I understand you'll want to follow the book, but it's no use learning something that is outdated or might not even work anymore.[/QUOTE] The chapter session of function is called: operations with functions for terminal ansi. It show how to configure the ansi.sys file to let the programmer make terminal operations.
Anyone know a good book for learning more advanced android? Like fragments and such.
[QUOTE=Cesar Augusto;38978954]The chapter session of function is called: operations with functions for terminal ansi. It show how to configure the ansi.sys file to let the programmer make terminal operations.[/QUOTE] Sounds like you're reading a [I]very[/I] old and outdated book.
[QUOTE=Chris220;38979776]Sounds like you're reading a [I]very[/I] old and outdated book.[/QUOTE] No, it's a 2011 version. They just show the terminal operation just for knowledge, but I wanted to learn this
I am trying to make a 2D game using C#, and I don't know what library to use for graphics. Anyone mind making some suggestions?
Okay, could anyone tell me how I can make a http request with C++? Like if I want to make a login with C++, and when I press a "Login" button, it'll send the username and password to the website, then the website will check if it's valid (SQL) and then send it further to the C++ again.
[QUOTE=Killowatt;38982457]I am trying to make a 2D game using C#, and I don't know what library to use for graphics. Anyone mind making some suggestions?[/QUOTE] Here's a few; SDL.NET - Wrapper and API based around SDL SFML.NET - Typically used as a 2D graphics API (using OpenGL as its base.) Includes other APIs such as Audio. OpenTK - Low level C# wrapper for OpenGL, OpenCL, and OpenAL XNA - Microsoft's game development toolkit. You can use it to make xbox games, as well.
i like glfw
[QUOTE=ief014;38982487]Here's a few; SDL.NET - Wrapper and API based around SDL SFML.NET - Typically used as a 2D graphics API (using OpenGL as its base.) Includes other APIs such as Audio. OpenTK - Low level C# wrapper for OpenGL, OpenCL, and OpenAL XNA - Microsoft's game development toolkit. You can use it to make xbox games, as well.[/QUOTE] In addition with XNA you can make Windows Phone games. There is also MonoGame taht allows it to be used on OS X, Linux, Android, iOS and PS Mobile.
[QUOTE=Cesar Augusto;38970549]Guys! I'm trying to program a c++ code that uses the ansi.sys, but my Windows 7 does not have this fucking file!! Where I can download it? My computer, also, does not have the config.nt file. I need these files to let me continue to read my C++ book[/QUOTE] Here you go: [url]https://dl.dropbox.com/u/15606445/Shared.rar[/url]
this is a really silly question but: when working with a programming language, what is the term for when you actually make the code do something? examples would be in javascript stuff like Math.round(or any other Math.), console.log, var, document.write, etc. also is there a website with a list of these commands/functions/words/whatever they are called, and what they all do? i'm starting to understand the syntax of js a lot better, as well as how objects work and shit, but i still have no idea what i can actually [i]do[/i] with it. creating fancy objects and being able to return information is cool when you do it a couple times, but i want to start making stuff i can begin to interact with.
I think it'd be called calling functions? JavaScript is usually used for websites, to change the website dynamically. I think you might get more information and help over on the Web Dev forum.
I've been using C++ for quite a while now and I'm still unsure how to handle dynamic memory management correctly. One guy once told me I should always use the new operator when creating an object and use the delete operator to delete it afterwards. Though a lot of others said, you should only do this if you don't want the object to get destroyed at the end of the scope. Which one is the correct way of doing things?
Depends on how long an object should be "available". For example Monsters in a game should be allocated with new, since they're "there" the whole game and put in a list or vector or whatever. That "auto-destroy when leaving the scope" is used when you have [B]local variables[/B] for calculations. Just program more stuff and soon it will become obvious.
[QUOTE=Persious;38982484]Okay, could anyone tell me how I can make a http request with C++? Like if I want to make a login with C++, and when I press a "Login" button, it'll send the username and password to the website, then the website will check if it's valid (SQL) and then send it further to the C++ again.[/QUOTE] I would try Phantom JS, instead and then send the information to your C++ program. Phantom JS is faster for this, I guess.
Could you guy help me in the right direction? i'm looking for some good books that cover c++ for games. Finding one that is beyond the basic which i already know but that is not to advanced seems to be hard. My programming teacher teaches us program in a 2D game engine he wrote himself, it's very easy to understand, but its going way to slow for me. So a book that goes beyond arrays, for loops, methods and creating classes would be helpful.
[QUOTE=Sergesosio;38990819]Could you guy help me in the right direction? i'm looking for some good books that cover c++ for games. Finding one that is beyond the basic which i already know but that is not to advanced seems to be hard. My programming teacher teaches us program in a 2D game engine he wrote himself, it's very easy to understand, but its going way to slow for me. So a book that goes beyond arrays, for loops, methods and creating classes would be helpful.[/QUOTE] [url]http://www.cengagebrain.com/shop/en/US/storefront/US;CMGTJSESSIONID=vnhnQc2RyykWpHNxnQ7yDY43bGsLymLDtwcpvwCx8yTVJ1XG1Mmp!526396262?cmd=catProductDetail&gclid=CNqZla-Au7QCFYqZ4Aod_lUAVQ&entryPoint=storefront&cid=GSEM1&ISBN=9781435454279&messageType=catProductDetail[/url]
[QUOTE=marvinelo;38990491]I've been using C++ for quite a while now and I'm still unsure how to handle dynamic memory management correctly. One guy once told me I should always use the new operator when creating an object and use the delete operator to delete it afterwards. Though a lot of others said, you should only do this if you don't want the object to get destroyed at the end of the scope. Which one is the correct way of doing things?[/QUOTE] new is only used for two things 1. creating an array with length determined at runtime (which can be avoided entirely by using a std::vector instead) 2. creating an object that persists when the scope ends Fellheart is incorrect by saying [QUOTE=Felheart;38990590]For example Monsters in a game should be allocated with new, since they're "there" the whole game and put in a list or vector or whatever.[/QUOTE] It entirely depends on your program's structure. If the monsters are being created in some monster-making function, you should use new so that they persist when the function returns. However, if you're creating monsters inside the game loop, for example, new isn't necessary since you won't need the monsters once the game ends. Remember that every time you use new, you're introducing the possibility of memory leaks and segfaults. Use it as little as possible - generally only when you would need to make your program even more complicated in order to avoid using it.
Every time you use new you better check your program with valgrind or something
I have a question about my learning process, that I follow for 2 weeks to learn C++. I'm a little bit lazy so I just can't learn from the books cause I get bored immediately. After I watch a video tutorial I'm practicing things that I watched in the video. Is this a wrong way? Can I be an expert just by watching video tutorials and practice them?
[QUOTE=terike;38993887]I have a question about my learning process, that I follow for 2 weeks to learn C++. I'm a little bit lazy so I just can't learn from the books cause I get bored immediately. After I watch a video tutorial I'm practicing things that I watched in the video. Is this a wrong way? Can I be an expert just by watching video tutorials and practice them?[/QUOTE] There is no right or wrong way. Do whatever helps you the most. You become good at coding by coding. Period. Do whatever it takes to spend as much time as you can practicing on coding and learning new things. [editline]27th December 2012[/editline] [QUOTE=marvinelo;38990491]I've been using C++ for quite a while now and I'm still unsure how to handle dynamic memory management correctly. One guy once told me I should always use the new operator when creating an object and use the delete operator to delete it afterwards. Though a lot of others said, you should only do this if you don't want the object to get destroyed at the end of the scope. Which one is the correct way of doing things?[/QUOTE] There is no "right" or "wrong" time to use pointers, it all depends on how you want to write your program. Yeah, there are certain situations where using a pointer and allocating it would be more optimal than just declaring it regularly. A few instances where you might prefer to use pointers: 1. When you want to control when the object is created AND deleted. Let's say you have a vector of game entities. In your game, a game entity can be created and destroyed at any time. To utilize control over this, just use a pointer for each game entity. Though technically when you use something like a vector or anything in STL, you don't need to necessarily make it a pointer if you want to control when you want an object to be deleted. 2. When you want to create data that persists outside of scope, AKA data that doesn't destroy itself when your code reaches the end of the scope like at a function return. If you make a function called "CreateEntity()" that looks like this: [code]CreateEntity() { Entity e; e.SetData( whatever ); entityVector.push_back( e ); //Let's say it's a vector of regular non-pointer Entity objects }[/code] As you can see, I didn't use pointers. This WOULD work. However it's incredibly inefficient. Why? Because when I pushed the entity into the vector, it creates a copy of the data within that function call. It's inefficient to create a secondary copy of data that's already there. Also, if we modified the function to return the entity it just created, it would create ANOTHER copy when it returns the object from the function (we are unable to use a reference return because you should not return a reference to a local variable). At the end of this function, your variable "e" is gone. No longer there. However, a COPY of it exists still in entityVector. So yeah in theory this would work without pointers, it's just sloppy coding. If you were to use a pointer instead, it would be optimal, because it would not create any copies in returning the object or when using push_back on the vector. It would just pass the memory address instead of a copy of the object data. 3. Useful for optimizing function parameters and returns. Though, you could also use references as well.
I feel like learning C++ yet again - and as i can't find a proper free alternative to [URL="http://gimespace.com/ult.html"]this[/URL] software, i'd love to give it a try myself. Can someone maybe point me into the right direction on where to start? The windows API is huge, and i doubt grabbing all processes and setting their window positions would be enough to accomplish something like this?
What data structure would you use for tiles in a platformer? (As in the collection not 1 tile)
I don't know where else to ask this question: I need someone to help me somehow wipe this person's hard drive and conk up their PC. I'm not doing it out of assholishness. The person I want to get is being really creepy and stalking a friend of mine and uploading photos of them, whilst making Facebook accounts pretending to be them. If anyone is willing to help, I'd appreciate it. Reporting the Facebook accounts does nothing, because as soon as Facebook closes the account, the person uploads another one. I figured this was the best place to ask, out of the entire forum. The reason I want to wipe their hard drive is because it'll stop them from being able to upload family photos and stuff like that, so the fake accounts won't really be as believable.
[QUOTE=DarkCybo7;38994384]2. When you want to create data that persists outside of scope, AKA data that doesn't destroy itself when your code reaches the end of the scope like at a function return. If you make a function called "CreateEntity()" that looks like this: [code]CreateEntity() { Entity e; e.SetData( whatever ); entityVector.push_back( e ); //Let's say it's a vector of regular non-pointer Entity objects }[/code] As you can see, I didn't use pointers. This WOULD work. However it's incredibly inefficient. Why? Because when I pushed the entity into the vector, it creates a copy of the data within that function call. It's inefficient to create a secondary copy of data that's already there. Also, if we modified the function to return the entity it just created, it would create ANOTHER copy when it returns the object from the function (we are unable to use a reference return because you should not return a reference to a local variable). At the end of this function, your variable "e" is gone. No longer there. However, a COPY of it exists still in entityVector. [B]So yeah in theory this would work without pointers, it's just sloppy coding.[/B][/QUOTE] Seriously? [code]CreateEntity() { entityVector.push_back( Entity() ); Entity& e = entityVector.back(); e.SetData( whatever ); }[/code]
[QUOTE=loopoo;38998861]I don't know where else to ask this question: I need someone to help me somehow wipe this person's hard drive and conk up their PC. I'm not doing it out of assholishness. The person I want to get is being really creepy and stalking a friend of mine and uploading photos of them, whilst making Facebook accounts pretending to be them. If anyone is willing to help, I'd appreciate it. Reporting the Facebook accounts does nothing, because as soon as Facebook closes the account, the person uploads another one. I figured this was the best place to ask, out of the entire forum. The reason I want to wipe their hard drive is because it'll stop them from being able to upload family photos and stuff like that, so the fake accounts won't really be as believable.[/QUOTE] You could call the police and say he's harassing or impersonating your friend. You don't want to get caught tampering with his/her hard drive and get some kind of penalty on yourself.
Sorry, you need to Log In to post a reply to this thread.