- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 5
- Posts with Downvotes
- 4
- Downvoting Members
- 5
- Interests
- Star Trek, Dungeons & Dragons, Astronomy, Archery, Japanese Music, Video Games
- PC Specs
- CPU: Intel Q6600 Quad Core 2.4 GHz, RAM: 3 GB DDR2 SDRAM, ATI Radeon 2400 HD Pro 128 MB Video Card
37 Posted Topics
Re: You people are over-analyzing this. All he needs to do is use IOMANIP. He should use a for loop to print however many asterisks are specified to a line, aligned to the right after he sets a width for each row. Then he should fill in the blank spaces with … | |
Re: Because newGame() is a method, not a class, and you are trying to declare an object of type "newGame". Simply change the code in your main() method to this instead. newGame(); | |
Re: Since you seem to have figured it out, take a look at the header file I'm working on. It isn't, by any means, complete, but it should help you a little bit to understand how it should be structured. [CODE=c++] /** * This header file was designed to make creation … | |
I'm not sure if it's the way I'm sorting this ArrayList or the way I'm constructing new Term objects. Can anyone tell me what's wrong? My program is too long, so I'll narrow it down to the parts that are giving me trouble: The declaring of the terms and new … | |
I'm having trouble aligning some text with setw and the left alignment. I'm not sure if it has something to do with the fact that I'm printing from a function. The text within quotes aligns fine, but the output from the function aligns to the right and screws up the … | |
Re: Here's a pointer. [CODE=c++] int y = 5; int * x; x = &y; *x = 10; [/CODE] | |
Re: If you don't even know what's wrong with the code, why are you posting it here? Compile it and find out. | |
Re: The variable 'i' is undeclared on line 36 because it is outside of the for loop. Look up variable scope. | |
Re: I'm sorry, but I had to ask... what was the point of this line? [CODE] if (x == 15 || x != 15) { [/CODE] ...that line will always execute, because no matter the number, it will always either equal 15 or not 15... | |
Re: Oh wow, talk about lazy... you didn't even attempt to solve the actual problem... you just wrote some simple output and an IF statement. And the assignment called for floating point numbers, not doubles... If you aren't will to make a serious attempt at the program yourself, nobody here is … | |
Re: Hahaha! Gladius33, you're not going to learn anything by getting everyone to do the work for you. Here's some pseudocode... if you can't figure it out by reading this, you probably shouldn't be a programmer. Not to mention that it doesn't sound like you even enjoy coding. It sounds like … | |
Re: The only web development resource you'll ever need. [url]http://www.w3schools.com[/url] | |
Re: For moving the picture around via the keys, look into KeyListeners. As far as the picture goes, you'll have to make the picture an object. The object draws the image to the screen. When keys are pressed, the KeyListener event methods within your object's class should redraw the picture the … | |
This is for the numerous people I see constantly asking how to "pause" the console after their code runs. The explanation for how the code works is within the snippet in comments. Basically, the "cin.clear();" function will clear the input stream, getting rid of any newline characters that would have … | |
Re: You might want to make the main class public? | |
Re: Is nobody else going to point out that he's trying to return a value with a void function? | |
Re: Why did you include <string> AND <cstring>? | |
Re: Nathaniel is right, you're using cin incorrectly. The correct syntax for getting multiple values with cin would be: [CODE] int x, y; cout << "Type two numbers: "; cin >> x >> y; [/CODE] | |
Re: That's scientific notation you're seeing, because the variable type you're using can't hold the numbers you're trying to store. | |
Re: Don't worry yourself trying to remember every little method... just memorize the syntax and keep a cheat sheet or a pocket reference with you. | |
Re: Why is it that people can never just do their homework on their own? You're not learning anything by having others do the work for you. | |
I'm trying to draw a string at the center of an applet. The problem is that it's STARTING to draw at the center of the applet and going off to the right. I need for the center of the string to be centered. Here's my code so far: [CODE] /** … | |
Re: String Stream is probably better for this kind of function. | |
I'm just starting to learn Java and I need help. I'm trying to draw a rectangle in an applet window and have it centered so that if the applet is repainted when it is resized, the rectangle will stay centered in the applet window. I know how to retrieve the … | |
Re: First of all, you need to have the font in a directory on your server. Then all you have to do is add a style to your main stylesheet. [CODE] @font-face {font-family: FontName;src: url('location of font');} [/CODE] Replacing FontName, obviously, with the name of the font, and the text between … | |
I am having trouble with the ads that T35's Free Hosting places on their member's pages. They insert the ads via Javascript just before the closing <body> tag. My problem is that they're floating off to the right of my web layout. I tried shrinking my layout and they went … | |
Re: What have you done to research the problem? If you're going to ask for help with the problem, it might help to post the actual problem instead of assuming we already know what it is. We will not write code FOR you... do some work yourself and post your code, … | |
Re: [CODE] static_cast<int>(boxesrequired + 0.5); [/CODE] We're not here to do your homework for you... you can figure out how to use that and why it works. | |
Re: Well there's your problem... you're using MySpace. | |
Re: I'm assuming that you mean you want to right-align text within an image? Do you mean you want the text to overlap the image? If so, you're going to have to put them within a div container and use absolute positioning. | |
Re: If you want an undetermined amount of employees, you won't be able to use an array. Use a vector, instead. | |
Re: Get an FTP client such as FileZilla and connect using the info your webhost provided you... learn to use Google... this is an easy question to answer if you had actually bothered to do any research yourself. | |
Re: I noticed that the text on your front page is jutting out from its container... wrap your text, bro. | |
Re: iamthwee... doesn't compile in Visual Studio 2010. I had to make a few minor changes. Here's the revised code. [CODE] //TETRIS #include <iostream> #include <ctime> #include <conio.h> #include <windows.h> using namespace std; enum { KEY_ESC = 27, ARROW_UP = 256 + 72, ARROW_DOWN = 256 + 80, ARROW_LEFT = 256 … | |
Re: 1. system("pause") is not portable... don't use it. 2. Get rid of Dev-C++... it's no longer supported or updated and needs to die. 3. If you can't figure this out or learn to use Google, then go read a book. Don't just jump ahead to the hard stuff if you … | |
Re: We're not going to sit here and walk you through everything you'll need to do to learn C++... here's a good resource for you... http://www.lmgtfy.com/?q=c%2B%2B+tutorials |
The End.