Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #2K
~10.6K People Reached
Favorite Forums
Favorite Tags
c++ x 103
c x 11
perl x 1

48 Posted Topics

Member Avatar for hkhk106

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; …

Member Avatar for sumtaru
0
241
Member Avatar for zoner7

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 …

Member Avatar for thelamb
0
104
Member Avatar for zoner7

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 …

Member Avatar for thriek
0
270
Member Avatar for muzhe

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 …

Member Avatar for muzhe
0
169
Member Avatar for jeezcak3++

[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 …

Member Avatar for thelamb
0
142
Member Avatar for tomtetlaw

Random question: Is it a general rule that the level of indirection on both sides of the = operator should be equivlant?

Member Avatar for mrnutty
0
110
Member Avatar for forever23

[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

Member Avatar for zoner7
0
75
Member Avatar for zoner7

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 …

Member Avatar for Sky Diploma
0
120
Member Avatar for sparcheta3

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 …

Member Avatar for jencas
0
140
Member Avatar for pt_solar
Member Avatar for pt_solar
0
275
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
86
Member Avatar for trung_a10
Member Avatar for Nick Evan
0
80
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
93
Member Avatar for zoner7

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 …

Member Avatar for Aia
0
102
Member Avatar for zoner7

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> …

Member Avatar for Ancient Dragon
0
139
Member Avatar for zoner7

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 …

Member Avatar for nucleon
0
115
Member Avatar for zoner7

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, …

Member Avatar for jephthah
0
171
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
803
Member Avatar for zoner7

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 …

Member Avatar for dougy83
0
86
Member Avatar for salman213

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++.

Member Avatar for Narue
0
574
Member Avatar for zoner7

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 …

Member Avatar for ff4930
0
88
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
107
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
92
Member Avatar for zoner7

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 …

Member Avatar for Radical Edward
0
530
Member Avatar for zoner7

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 …

Member Avatar for zoner7
0
116
Member Avatar for zoner7

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. …

Member Avatar for Ancient Dragon
0
109
Member Avatar for chickenlord500

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 …

Member Avatar for zoner7
0
195
Member Avatar for zoner7

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 …

Member Avatar for bugmenot
0
1K
Member Avatar for zoner7

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 …

Member Avatar for Cybulski
0
328
Member Avatar for zoner7

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, …

Member Avatar for zoner7
0
102
Member Avatar for zoner7

So I have a multi-dimensional array, and I want to pass a reference of it to another function so that the array is defined in the scope of the function, because the array is not a global variable. If I can remember correctly, the syntax looks a little like this: …

Member Avatar for Ancient Dragon
0
124
Member Avatar for zoner7

I basically need a function that, after a certain amount of time has elapsed, will restart a program from scratch. This is because the code can get stuck at a certain point if wrong decisions are made. I am curious how to go about making this. I am sure it …

Member Avatar for Ancient Dragon
0
120
Member Avatar for fans3267

Well, this assignment is a classic example of game theory. It might help to read up on the prisoner's dilemma to get a better idea of what the assignment is asking for.

Member Avatar for Nick Evan
0
298
Member Avatar for zoner7

So I decided that I wanted to make a Sudoku creator and solver for fun. My plan is to fill a sudoku board with random, however, compatible answers using brutefruce. I simply check random numbers against the two prerequisite rules for a legitimate Sudoku: a given cell cannot contain the …

Member Avatar for Duoas
0
178
Member Avatar for zoner7

So I'm trying to create a fairly simple program that allows a user to modify a list of games. The user can add, remove or simply call an enumeration of the games currently inside the list. The compiler keeps telling me that there is a problem with my use of …

Member Avatar for vijayan121
0
94
Member Avatar for zoner7

Typically the code that I have seen uses phrases such as i++ as opposed to ++i. Recently, in a recently purchased book, I have seen the former implemented. As I understand i++ means that the addition takes place after the line is executed and thus with the initial value of …

Member Avatar for Abzero
0
274
Member Avatar for hapiscrap

Look at that error message. The answer is starring you in the face. Take a close look at the following line: C:\Dev-Cpp\payroll.cpp:24: error: expected `;' before "return" This should solve all of your problems

Member Avatar for Salem
0
346
Member Avatar for jimJohnson

He's not really being a dick. He's just telling you plainly what you did incorrectly. You probably want to add the comments first. all you need is the // in front of the text you want to be a comment, meaning that it will not be interpreted by the compiler …

Member Avatar for brk235
0
83
Member Avatar for chihuyu

I'm not sure if you care or not, but your sum variable does not include the value when n = 0 (1).

Member Avatar for technogeek_42
0
124
Member Avatar for flash121

in line 12 " while ( total < size && std::cin>> word )", why do you include "&& std::cin>>word." Why would this be a condition of the while statement? Shouldn't it be a statement that is executed if the while statement is true?

Member Avatar for Narue
0
218
Member Avatar for #include<DAN.h>

Using namespace std tells the compiler where the functions following it will be located - in this case, it is the standard library, hence std. Alternatively, you could put std:: (code) before every line to specify that the following code is from the standard library, but this method would be …

Member Avatar for Duoas
0
614
Member Avatar for Chris11246

okay... here are a few decent sources. [url]http://www.cplusplus.com/doc/tutorial/introduction.html[/url] this site is quick but a little brief at times. It is more of an example reference. [url]http://newdata.box.sk/bx/c/\[/url] This is simply a more clear but longer version of the first site. [url]http://www.steveheller.com/cppad/Output/dialogTOC.html[/url] This is definitely the most detailed of them all, sometimes …

Member Avatar for VernonDozier
0
115
Member Avatar for kashmir323

[code=C++] #include <iostream> using namespace std; int main () { float goldennumber, dummy; float finalnumber; float ratio = 0.618; cout<<"Welcome to Easy Golden Ratio Finder!\n"; cout<<"\n"; cout<<"\n"; cout<<"\t Please enter the length of the rectangle: \n"; cin >> goldennumber; finalnumber = goldennumber * ratio; cout<<"Your number is: "<< finalnumber <<"\n"; …

Member Avatar for kashmir323
1
89
Member Avatar for zoner7

I'm hoping to create a program that allows a user to enter several points, their coordinates and their masses and then calculates, over a period of time, each points' new coordinates due to gravity. I've started a code to calculate position, and I'm trying to understand why DEV C++ keeps …

Member Avatar for rajatC
0
118
Member Avatar for limac

There are a few issues. In the line, "string input = Add;", I don't think you need the Add there. All you need to do is initialize the string input. The line if(Add) needs to be changed to "if(input == "Add"). Additionally, every if line needs to use ==, not …

Member Avatar for Rippie
0
266
Member Avatar for zoner7

I started using the tutorial "Teach Yourself C++ in 21 days" yesterday, and I absolutely love it's clarity. However, there is one thing that perturbs me about it. All of the code written in the code is numbered. This is a great feature until I want to try running the …

Member Avatar for Jishnu
0
183
Member Avatar for zoner7

[CODE=C++] #include <iostream.h> int main() { enum Days { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Â_Saturday }; Days DayOff; int x; cout << "What day would you like off (0-6)? "; cin >> x; DayOff = Days(x); if (DayOff == Sunday || DayOff == Saturday) cout << "\nYou're already off …

Member Avatar for Lerner
0
88
Member Avatar for zoner7

[CODE] #include <iostream.h> #include <time.h> #include <stdlib.h> #define MAX_RANGE 1000 main () { long value, guess; int tries = 0; srand ( time (NULL) ); // Initialize random generator value = rand()%MAX_RANGE+1; // Get random between 1 and MAX_RANGE cout << "A random number has been selected between 1 and …

Member Avatar for kv79
1
399

The End.