Beginners - March 2010 (Page 4)

Question regarding this prime number code.
 
Hey all, I've been reading C++ Without Fear, which in my opinion is a fantastic book for beginner...
[9 replies] Last: I did and it always comes back as "number is prime." Here's the lis... (by wolfcry)
VC++ vs MinGW vs Linux GCC
 
I have written the following code and compiled it on 3 different compilers (pardon the probably terr...
[3 replies] Last: well I mean... what are you benchmarking? clock()? cout? ++a? ... (by Disch)
For Loop Issues
 
Problem: I am trying to code a sample textbook program that will take a string consisting of a firs...
[4 replies] Last: Zhuge, Yes, you are right. I think that it should be: for (k = ... (by jtkhoskinson)
storage area of the struct data type
 
I was trying to run this program. I am getting this error " An unhandled exception of type 'Syst...
[1 reply] : It looks like this: You call destroy tree, which deletes the tree and ... (by Zhuge)
template nested classes and compilation error: no match for operator!=
 
Hi everybody, I'm trying to create a matrix class. This class has a nested class called linear_t ...
[12 replies] Last: In regard to the original problem: Here is an extract from the book "... (by guestgulkan)
Problems with templates
 
This will compile link and run: link_list.cpp: #include <iostream> #include <stdexcept> #inc...
[4 replies] Last: I just ran a test and you were right it is not awkward--I had a miscon... (by closed account iw0XoG1T)
how to find speed of a statement?
 
n = 5; a = n + 1; how much time will it takes? a = n++ ; how much time will this statement tak...
[5 replies] Last: thank you (by somasekharever)
Secant method
 
Please help? Not sure why it won't compile. Any suggestions? #include <iostream> #include <i...
[no replies]
priority queue
 
Can somebody please explain to me how the stl priority_queue works(not at an implementation level..m...
[1 reply] : http://www.cplusplus.com/reference/stl/priority_queue/ (by Bazzy)
by CurtP
How do I clear cin when wrong type is entered?
 
This week I'm learning about exception handeling and I'm using try,throw,catch. When I get a char i...
[3 replies] Last: Thanks I seem to have gotten it to work. I had to throw in cin.sync()... (by CurtP)
A vector( or queue) of pointers
 
Hi, If I have a vector( or a queue) I was wondering what would happen when I pop an element from ...
[4 replies] Last: No. pop_back() does not return anything. It simply removes the last ... (by firedraco)
Abstract_Class
 
Hi all I'm having trouble figuring out a return for an abstract class, please see below: //Abstra...
[4 replies] Last: Thank you, that's a great help :) (by alb10811)
by navi33
is this the same??
 
The problem is to print odd numbers from 1-100 and its sums. i got the problem. im just asking if ...
[3 replies] Last: you're welcome. (by Dacster13)
by navi33
how to?? last one ^_^
 
switch(choice) { case'A': case'a': cout<<"Enter value in KM: "; cin>>km; m=km...
[5 replies] Last: @firedraco: you got me there.. that answers my question~ @Grey... (by navi33)
by chron3
Error after task perform
 
I've written this as a revision and although the program works but at the end of the program, a erro...
[3 replies] Last: mcleano : it's almost like a error message when a program crashed. ... (by chron3)
Pascal's Triangle
 
Hi all, I have a question. I have created a code for printing Pascal's Triangle. There is a poin...
[4 replies] Last: I have already got the desired result, the code above has been changed... (by pinoynl)
Best way to learn programming
 
Hello, for the past few years, I've really been getting into programming. I understand the basics ...
[8 replies] Last: Thanks everyone. I'll try to fully understand the core basics of C++ (... (by billlin)
It seems very simple, but I cant fix it!
 
#include <iostream> int main (); { int a; cout << "What is your age?" << endl; cin >...
[2 replies] Last: Thanks! It worked. (by Fbar800)
character replace
 
How would I replace a space " " with and underscore "_"?
[4 replies] Last: This one may be used on character arrays: http://www.cplusplus.com/re... (by moorecm)
show memory locations
 
Hi all, I have a question. How can I show a memory location in hexadecimal notation? I want to sh...
[5 replies] Last: No problem. (by chrisname)
March 2010 Pages: 123456... 34
  Archived months: [feb2010] [apr2010]

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