Forum: C++ Aug 25th, 2009 |
| Replies: 12 Views: 533 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 FANTASTIC... |
Forum: C++ Aug 24th, 2009 |
| Replies: 7 Views: 260 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.
... |
Forum: C++ Aug 18th, 2009 |
| Replies: 7 Views: 332 Random question:
Is it a general rule that the level of indirection on both sides of the = operator should be equivlant? |
Forum: C++ Aug 18th, 2009 |
| Replies: 7 Views: 263 oops. I thought the creator of the thread posted that.
My apologies
That explains a lot :) |
Forum: C++ Aug 18th, 2009 |
| Replies: 7 Views: 263 no offense, but I don't think anyone is going to help you after that post...
By the way, the Google search produced nothing |
Forum: C++ Jun 18th, 2009 |
| Replies: 7 Views: 277 The complier is complaining that Point Ball::itsPosition is private in point.cpp in the both int Point::Distance ( ) functions.
Here is a copy of point.cpp
#include "Point.h"
#include... |
Forum: C++ Jun 18th, 2009 |
| Replies: 7 Views: 277 It's basically empty... it actually is empty.
#pragma once
#include "Ball.h"
class PlayerBall : public Ball
{
public:
PlayerBall(int, int); |
Forum: C++ Jun 18th, 2009 |
| Replies: 4 Views: 266 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? |
Forum: C++ Jun 18th, 2009 |
| Replies: 7 Views: 277 thank you very much... Now I have another problem.
I've commented the errors on their appropriate lines below
//ball.h//
#pragma once
#include "Point.h"
#include "Velocity.h"
#include... |
Forum: C++ Jun 18th, 2009 |
| Replies: 7 Views: 277 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... |
Forum: C++ May 19th, 2009 |
| Replies: 2 Views: 276 I guess I'll post what I've done so far. The last bit is psuedocode. I just need someone to tell me if I'm on the right track or not.
bool GenBoard(class Tile... |
Forum: C++ May 19th, 2009 |
| Replies: 2 Views: 276 bool GenBoard(w,[])
accidentally messed up the function arguments. here is a modified version |
Forum: C++ May 19th, 2009 |
| Replies: 7 Views: 424 you need to include the string library
#include <string> |
Forum: C++ May 19th, 2009 |
| Replies: 2 Views: 276 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... |
Forum: C++ May 14th, 2009 |
| Replies: 3 Views: 181 I think you just need to make d a float instead of an int |
Forum: C++ May 14th, 2009 |
| Replies: 6 Views: 342 ooo. thank you very much
I definitely would not have figured that one out on my own |
Forum: C++ May 14th, 2009 |
| Replies: 6 Views: 342 hmm.. I'm still getting the same issue as before. I changed it to float Dwins = 0, Awins = 0; |
Forum: C++ May 14th, 2009 |
| Replies: 6 Views: 342 I got that part.
float Dwins, Awins = 0; |
Forum: C++ May 14th, 2009 |
| Replies: 6 Views: 342 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. ... |
Forum: C Apr 23rd, 2009 |
| Replies: 3 Views: 303 Well. new question.
The compiler keeps flagging warnings on arguments 2 and 6 of the call to RC4 on line 40. It keeps telling me that I am using incompatible pointer types.
What does that... |
Forum: C Apr 23rd, 2009 |
| Replies: 3 Views: 303 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?
#include <stdio.h>
#include <stdlib.h>
#include... |
Forum: C Apr 22nd, 2009 |
| Replies: 1 Views: 730 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.
... |
Forum: C Apr 22nd, 2009 |
| Replies: 5 Views: 331 I heavily commented the code. It should be much more understandable now.
so we are basically focusing on lines 122 to 163
/*
* getc(f): returns a byte of data from file f (EOF means end of... |
Forum: C Apr 21st, 2009 |
| Replies: 5 Views: 331 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... |
Forum: C Apr 18th, 2009 |
| Replies: 2 Views: 350 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... |
Forum: C Jan 26th, 2009 |
| Replies: 6 Views: 992 okay. So now I have a much better idea of what I'm doing.
I got most of it right now.
#include <stdio.h>
void Function(char *source) {
int buffer[10];
int *ret;
ret = buffer + 16;
(*ret)... |
Forum: C Jan 26th, 2009 |
| Replies: 6 Views: 992 we actually don't have a book...
Plus this class is wayy past the basics. I'm just taking it randomly. I've never formally been taught a computer language.
I guess this works a little bit better... |
Forum: C Jan 26th, 2009 |
| Replies: 6 Views: 992 I think this is what it should look like... I'm not exactly sure what to do with the pointer syntax in the functions. Why do I not define *source before I call it in the function? Is it because I... |
Forum: C Jan 26th, 2009 |
| Replies: 6 Views: 992 yeah... forgot to mention that he told us explicitly not to do that. If I remember right, if I were to use a buffer overflow and consequently receive a segmentation error, I would have the same... |
Forum: C Jan 25th, 2009 |
| Replies: 6 Views: 992 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... |
Forum: C++ Sep 15th, 2008 |
| Replies: 4 Views: 1,128 Thank you for the advice.
I tried making said folder and placing my source code in it, but the program still did not link. |
Forum: C++ Sep 15th, 2008 |
| Replies: 4 Views: 1,128 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... |
Forum: C++ Jun 21st, 2008 |
| Replies: 5 Views: 5,222 hmm. I was able to remove and then redownload and reextract the begin_code.h / close_code.h headers. This solved my problem. Thanks for the help. |
Forum: C++ Jun 20th, 2008 |
| Replies: 5 Views: 5,222 So I'm currently using Lazy Foo's tutorials. Here's the link:
http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet05e/index.php
I followed all the instructions, but I'm having a couple... |
Forum: C++ Jun 20th, 2008 |
| Replies: 5 Views: 781 hmm.. looks like that precompiled header is required after all. Thank you for the quick solution. |
Forum: C++ Jun 20th, 2008 |
| Replies: 5 Views: 781 I'm using Visual Studio 2008 express edition.
Yea, I chose a console-application. |
Forum: C++ Jun 20th, 2008 |
| Replies: 5 Views: 781 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... |
Forum: C++ Jun 19th, 2008 |
| Replies: 36 Views: 3,455 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... |
Forum: C++ Jun 19th, 2008 |
| Replies: 6 Views: 715 Awesome. Thank you for the help. I've also got one other question, this time about constructors.
In the following code,
1: // Listing 9.13
2: // Returning a reference to an object... |
Forum: C++ Jun 19th, 2008 |
| Replies: 6 Views: 715 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... |