- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: I don't have any books, but I've got an excellent place to start. I started teaching myself C++ about 2 weeks ago and have had a lot of success with several online tutorials. After sifting through the entire World Wide Web, I've found a lot more trash than noteworthy sites; … | |
I have a vector class that is defined using a template. VS 2010 is underlining every instance of these templates, claiming that the identifier Scalar is undefined. Peculiarly, these errors only occur in the definition of the class I will list first but not the one that inherits it. Here … | |
So I'm currently using Lazy Foo's tutorials. Here's the link: [url]http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet05e/index.php[/url] I followed all the instructions, but I'm having a couple issues. So when I choose an empty project, like the tutorials recommends, as opposed to one with a precompiled header, the C/C++ tab does not appear, and I am … | |
Re: so you want to essentially fill an area with some sort of shape? if x=10, y=5 and z=3.14, you will only have a single pointer located at those coordinates. There is nothing to iterate through. You will need a range of coordinates: for example, x = [5 - 10], y … | |
Re: [QUOTE=jeezcak3++;958286]Thanks! i guess it was not easy for anyone at first?[/QUOTE] well, let me give you one tip that no one ever gave me. Do Not use learn c++ in 21 days. It is decent, but there is a much better tutorial: Use the tutorial at learncpp.com. It is a … | |
Re: Random question: Is it a general rule that the level of indirection on both sides of the = operator should be equivlant? | |
Re: [QUOTE=VernonDozier;951978][url]http://lmgtfy.com/?q=tridesclist[/url][/QUOTE] no offense, but I don't think anyone is going to help you after that post... By the way, the Google search produced nothing | |
This program is frustrating me. I cannot for the life of me figure out what is causing this error message. It's the sort of thing where I fix one issue only to cause 10 more. The compiler is giving me like 8 identical pairs of errors, one for each Ball.itsPosition.getX/Y … | |
Re: why did you change CandyBar* cb = CandyBar new[3]; to CandyBar* cb = new[3]; How will the compiler know what type the array of 3 is? Is that implicitly defined by the fact that cb is of type CandyBar? and because something of one type must point to something else … | |
Re: you need to include the string library #include <string> | |
I'm trying to write my first game, and in order to do so, I need to design a recursive algorithm with backtracking capabilities. In the game, there is a grid of tiles. Some of these tiles back be moved to; however, a few of them are impassable. The goal of … | |
Re: I think you just need to make d a float instead of an int | |
There is clearly something wrong with the else statements in this code. This program essentially mirrors the attack/defense rules in the game risk. The attacker roles 3 times. The defender 2. The best two roles of the attacker are taken and compared to the defender's two roles. The defender wins … | |
If you look at the end, i try to store some values in a few arrays. When i try to print these out, I receive complete junk. any thoughts? [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX 122 #define MIN 48 char GetRand(); void RC4(char *realpw, char … | |
If you run this code, you will see that the first two lists values do not show up. I'm pretty sure this is because I am trying to print chars as numbers. I'm just wondering how to do this. Thank you. [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> … | |
So I've got a program that takes an encrypted file and essentially decrypts it. I am now trying to modify this file. During the encrypting process, the words were scrambled by position. The location of each word is marked with a position value. I decrypted the original text, so now … | |
Alright. This is a pretty simple program. The program simply reads a simulated DRM (basically an encrypted plain text file) file that was encrypted using RC4. It then reads a plain text file that contains the exact same plain text that the DRM file would decrypt too. (This is assuming, … | |
I'm currently taking a computer security class. The thing is, I haven't even taken an intro computer programming course. I taught myself a good deal of C++ back this summer, but I hardly know as much as the other students in the class. we were asked to manipulate the following … | |
So I am using Dev C++ to compile this program; however, whenever I attempt to compile, I recieve a linker error that states, "[Linker error] undefined reference to '_cpu_features_init' ld returned 1 exit status" I googled the question, and people suggested that it may have something to do with the … | |
Re: I admire your courage salman. When people come and... well.. sort of insult you (no offense to anyone), you simply drive forward with further questions. Keep the same attitude, and you will be as proficient as anyone at C++. | |
I am currently reading the learn C++ in 21 days tutorial. In a chapter on references, when the author summarizes some of the main points inside a respective section, he explicitly states, "DON'T return a reference to a local object. " I am simply curious what this means. I have … | |
I've always used the Dev C++ compiler; however, I keep hearing how the software has little support. Additionally, I have heard people praise the debugger of Visual C++. So, end result, I'm deciding to switch from one to the other. My only problem now is that I can't make the … | |
I've got something like 400 lines of code at this point, and I realize that not too many people will be inclined to look at it. Thankfully, the majority of it works swell, and I only need part of it examined. I realize that my use of vectors is not … | |
As I write my code, I am realizing there are numerous places where a type int could easily be substituted with a type char. Because type char uses less memory than its int counterpart, I am curious why people don't prefer the former more often. for example, it's not uncommon … | |
I have a function inside another function that is called by main(). Inside the innermost function a vector is created, which I would like to return to the first function, which I would further like to return to main(). I suppose that I could create the vector in main and … | |
I am having a compiling issue because of some syntax errors while trying to return an array. You can probably ignore most of the code below; I am only concerned with the call and return of the CreateBoard[][] array. As I understand a pointer might be necessary to do this. … | |
Re: You're using the beginner's guide to C++ game programming! I wrote the same program. Let's see what mistakes I can find. Below is the code I used. Let's see if we can just compare the two. [CODE=C++] #include <iostream> #include <string> #include <vector> using namespace std; int main() { int … | |
I'm trying to skip part of my loops by using continue; however, I am unsure where how much code each continue statement skips. My suspicion is that, in the below code, the continue statements effectively do nothing and put my code right before the return false statements. I have marked … | |
I've got a pretty simple question. I'm trying to ask the player for to choose a difficulty. I want the case to be to not affect his choice, so I am using the toupper() function. Unfortunately, when I try to return the value of the difficulty, no matter what difficulty … | |
I currently have a program that writes Sudoku boards to files; however, I would like the program to be able to read the board already in the file, copy it and then add another board to the file. It follows, then, that if there were two boards in the file, … |