Beginners - March 2013 (Page 80)

Getting no result on simple math problem
 
Hello all, Using the code shown below I am not able to get any kind of result, it just prompts me with my directory again. Using G++ as a compiler. I've been...
[1 reply] : After the last cout statement, you need to flush the output buffer. ... (by Chervil)
random prime number
 
i am just started with c++ now stuff are getting a little more harder and i just can do this simple thing. i need to ask the user for two prime numbers a...
[no replies]
by ace55
Help concise program please!
 
Hi guys, in my program i have added validation for the month and year to be what i need. i wrote out the whole output for the if and else if for the validati...
[no replies]
by mted
displaying bitmaps.
 
I just learned the basics of C++. I still haven't learned many things about the language, but I will soon. Anyway, I want to make a simple small game, and I nee...
[1 reply] : The standard lib that comes with C++ does not support graphics. You w... (by Disch)
Function of "for"
 
Can someone tell me what is the function of "for" in this program? I guess the "for" is just to give to the block the value of "d". The program is the solution ...
[7 replies] Last: Do d = d + 2 or d += 2 to increase d by 2. (by Peter87)
by rcast
Get rand() to guess higher and lower
 
This program accepts a users secret number between 0-100 and the computer will guess the number. If it's high or low the user indicates that to the computer, an...
[5 replies] Last: Divide and conquer! lol Get the range and guess in the middle. (by Lynx876)
Compiling C++ for Windows 7
 
Hello, Thank you for reading my post, I am new to this website as well as the C++ programming language and am seeking any help that can be provided regarding...
[5 replies] Last: Also, when running VS for the first time, you have to set up the envir... (by Lynx876)
Need help with Computer AI script.
 
I'm writing a simple text game, all is well so far but I cannot figure out a solution to strategically writing a script to perform a randomized function... ...
[2 replies] Last: I figured I should probably impliment switch statements and this will ... (by EmperorXyn)
by Kubani
enum and incompatibility between declaration & definition
 
Hi all, Please consider these two codes: class Book { public: enum Genre { fiction = 1, nonfiction, periodical, biography, children }; Genre ...
[4 replies] Last: Ow. Ok. Thank you very much. (by Kubani)
Comparing Vertices in a Graph?
 
cout<<"How many letters do you want to play with?"<<endl; cin>>x; cout<<"where do you want to move player?"<<endl; cin>>line3; while(text.good()) ...
[1 reply] : woops. just realized this is flawed too. it doesn't include "bat" or a... (by MMhawk607)
by hallaa
problem in code
 
the question is Create a Sphere class, define its attributes for the radius x coordinate, y coordinate, z coordinate as Center points using double data type, in...
[5 replies] Last: If you've previously compiled the source and ran the executable from w... (by cire)
Reading in from a file
 
Please do not post links to read in writing into a file tutorials here. I already read them, and did not find an answer. I wrote a program that reads values ...
[2 replies] Last: If this is the exact contents of the file: Rate= 0.25; L=540; Rate = ... (by Chervil)
Functions will not do math
 
I can't get any output for celcius besides zero out of either function. #include <iostream> #include <iomanip> using namespace std; void celcius(int);...
[7 replies] Last: [quote=geharbison]We haven't learned what "ftoc" is in class, You won'... (by Chervil)
by rcast
qsort and compar
 
I'm having trouble with the beginners exercises originally posted by Blitz Coder here: http://www.cplusplus.com/forum/articles/12974/ Specifically, I'm having ...
[6 replies] Last: So close. Success. Thank you sir cire (by rcast)
by SmOgER
Reading from file with different amount of digits in lines
 
Oke, so I have data txt looking like this: 8 9 5 7 -5 13 -4 11 7 5 -3 12 -5 17 -3 25 7 12 -3 5 -5 7 -5 3 14 5 12 -3 10 -7 8 5 1 -40 33 5 15 -5 9 -3 8 11 5 -12 ...
[6 replies] Last: bump (by SmOgER)
I need to figure out some sort of loop to find prime numbers within a restriction of numbers
 
Write a program that will prompt for 2 numbers and determine all the prime numbers between the 2 numbers: Example: Enter the first number: 3 Enter the ...
[1 reply] : At the top of the page there is a light blue box with a light blue but... (by cire)
Initialization list
 
I am having trouble initialize an array of objects. This is what I have; this are the constructors in the Student Class Student() { info.firstName = "Mik...
[7 replies] Last: //I'm a beginner but: I think you should do something like that: int... (by fx11)
Nested for loop doesn't do what I want...
 
Hey guys, So it seems that when I compile my code, #include <SDL.h> using namespace std; class Cube { public: Cube(int x,int y,int w,int h) { XPos = x...
[9 replies] Last: I'm glad to help. The only other thing I notice is that you are leaki... (by Disch)
How does cmath define its namespaces?
 
I tend to use 'j0', 'j1', 'j2' as parameters inside my for loops. Lately, I wrote a function like this: #include <cmath> using std::sqrt void foo(unsigned in...
[4 replies] Last: The wikibooks article states " These are not present in any ANSI or IS... (by Chervil)
by Sumeth
Entry point problem
 
I have been trying to install allegro into codeblocks. I have gotten to the point where it will compile. I know have a different problem. Please follow the lin...
[2 replies] Last: http://imgur.com/JALq7Bx These are my linkers for the build options an... (by Sumeth)
March 2013 Pages: 1... 7879808182... 87
  Archived months: [feb2013] [apr2013]

This is an archived page. To post a new message, go to the current page.