Beginners - February 2009 (Page 4)

what is the c++ code for identifying if a number is a prime number or not?
 
example: enter number:97 your number is prime enter number: 4 this is not a prime number!
[4 replies] Last: What ever happened to just answering http://www.cplusplus.com/forum/ar... (by helios)
by tjinx
Timer
 
I'm supposed to create a program that inputs a start time and end time in the format hr:min:sec and then finds the total time elapsed. Also, it's using a 24-hou...
[1 reply] : Can you not use functions? It would simplify things a lot if you wrot... (by jsmith)
by masiht
void function
 
void is the type of function which doesn't need to return then why is this program not working ? #include <iostream> using namespace std; void addition(i...
[8 replies] Last: Globals work too. (by vorticidal)
by masiht
heap and stack
 
Can anyone please tell me what is heap and stack with explanation ??
[2 replies] Last: A variable declared statically is on the stack int i; A variable de... (by Bazzy)
pls Explain Operator Overloading
 
Hi All can anyone help me in explaining operator Overloading concept, i know its a type of polymorphism and we can use operator in diffrent ways with the he...
[3 replies] Last: Read the tutorial at http://www.cplusplus.com/doc/tutorial/classes2.ht... (by Bazzy)
by masiht
declaring a function
 
Why do sometime we declare the functions and sometime do not ? how do we know when to declare the function ? like // function example #include <iostream> u...
[7 replies] Last: eker676, your 'function protoype' is the (forward) declaration, the d... (by closed account z05DSL3A)
Repeating an Action
 
I'm supposed to print off stars. I prompt the user for a number (we'll call it n ), and then print out n lines of stars. The first line will have one star an...
[4 replies] Last: @eker676 - I don't think many people would realize they can search "pr... (by Mythios)
Eliminating duplicate lines in a text file
 
I have a very large text file, with something like 39 million lines. Each line is a string of 23 integers (but I don't need to treat them as integers for my pu...
[9 replies] Last: Try the STL next_permutation algorithm on for size. (by seymore15074)
I'm not sure what I'm doing wrong.
 
I've been working on a program for a little while now, it's a program to help with the ideal gas laws in chemistry. (I understand the equation inside and out, I...
[4 replies] Last: Yeah, I'd just skimmed it to see the syntax. I realized that just bef... (by TylerM91)
by Ph0X
Outputting sounds (from frequency)
 
What I need to do is to output sounds from the default sound playback device. I'm guessing I have to use DirectSound or something. What I basicly want to do ...
[7 replies] Last: Sorry but bump again. I really need to get this done. Can't find how... (by Ph0X)
by masiht
header file
 
Can any one tell me what is header file and give me some examples .I will be thankfull.
[6 replies] Last: Header file #include <iostream> #include <myfile.h> ... (by eker676)
by Nappy
Practice questions...?
 
Hey Im a student learning c++ and am wondering is there a site with questions on it, programs to write, solutions etc Just to see if im progressing at all?? ...
[2 replies] Last: Here's a link with project ideas. http://www.cplusplus.com/forum/begi... (by eker676)
Calculating coin combinations using do-while loops.
 
Hello! I'm new at programming; I just started it last month. I have an assignment that involves using do-while loops for calculating combinations of coins. I'm ...
[9 replies] Last: For future reference place [ /code] around the text. Without the spa... (by eker676)
by masiht
source listing
 
what is source listing for a program ?
[3 replies] Last: I don't know what you mean but he means the actual code you write i.e... (by eker676)
by oj4y
Need random number, different % times
 
I need to generate a random number, but a better chance at generating a particular one. For example: I would like to generate 0, 90% of the time, and 1 10%...
[8 replies] Last: Got it! Thank you! (by oj4y)
How to use setw and setfill properly
 
First, this is a homework assignment. I am not trying to hide that. I also don't expect anyone to do my homework for me. But I do need help understanding H...
[6 replies] Last: Finally got it... Just a matter of proper placement and syntax. Ge... (by frankiefrazer)
Store results in a while loop
 
I am a complete beginner, I just need a hint or something to this problem: We have to create a program where the user inputs a number, and figure out how many...
[5 replies] Last: Let me reword the problem in a manner that should help make how to cod... (by jRaskell)
Rounding Statement
 
Thank you!
[1 reply] : Try reading this article: http://www.cplusplus.com/forum/articles/3638... (by Bazzy)
Hi all! Info on a console game
 
Hi, this is my first message here. Great site! I'm creating a console game based on an italian game, called "Tombola" http://en.wikipedia.org/wiki/Raffle. ...
[no replies]
debug with visual c++ 2005 express edition
 
Hi, i would debug a project in visual c++ 2005 express edition, but i get this error: fatal error C1083: Cannot open include file: 'windows.h': No such file or...
[4 replies] Last: Have you looked in the include directories? (by Bazzy)
February 2009 Pages: 123456... 22
  Archived months: [jan2009] [mar2009]

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