General C++ Programming - February 2013

Why doesn't this work with N>8000
 
It returns correctly for anything less than 8000 as max. Any clues? void sieve::sequential(){ std::list<double> seqPrimes; double root = sqrt(max); ...
[6 replies] Last: You were right. void sieve::sequential(){ std::list<int> seqPrimes... (by yelnatz)
Hello, world!
 
so (it was on this forum actually) I saw a thread a while ago before i joined about cool ways to write hello world. anyone have some?
[1 reply] : Hello Word? (by S G H)
by LFDC
Unhandled exception in .exe 0xC0000005 access violation
 
Hi all! I'm trying to run this program, but at one point it crashes and gives me the following error: Unhandled exception in VideoColorExtraction.exe 0xC00...
[2 replies] Last: i think you are trying to access files that you need to be admin(windo... (by closed account Dy7SLyTq)
How to load files??
 
So I'm hoping anyone can give an example on how to load .wav files. Say there are several .wav files in a folder called "sounds" in "My Documents", what would b...
[3 replies] Last: http://connect.creativelabs.com/openal/default.aspx (by closed account Dy7SLyTq)
by mrpeed
Can't create a window with freeglut
 
#ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <math.h> #include <iostream> using namespace std; const in...
[no replies]
if/else problems
 
I am having beginner troubles with a personal project of mine for practice i am wanting and if / else after being prompted for the user to type "continue" I a...
[2 replies] Last: Thank you It worked (by no names232)
Need help in spotting error
 
I'm creating a dice roll program and my teacher asked us to change our program around a # of different times. This time she wanted us to use specific functions ...
[11 replies] Last: Walter Savitch: Problem Solving with C++ 8th Edition and yeah I unde... (by nheath12)
linked list
 
Hi I know what and how to make a linked list but I do not know how to make one with the pointer THIS. Does someone could help me find a track on how to use T...
[9 replies] Last: [quote=Smac89]That being said, the "this" keyword is particularly usef... (by LB)
Overloading Functions Help [Else If Statement]
 
Hello. I got a small problem, as is expected here I assume haha. So this just tells me I have an "else without a previous if", but there's an if right there. I ...
[2 replies] Last: Oh, so it was ending it before it even checked the if statements... Oo... (by MetaTheCat)
Error: Reference to non static function must be called?
 
So on lines 36 - 39 (The commented out functions) is where I'm sure is causing this error because once I don't comment them out pretty much everywhere Flink or ...
[4 replies] Last: Alright, thanks you two I'm no longer getting that error (Now if only ... (by A Newbie)
Code for Balanced Partitioning Dynamic Programming Problem
 
Can someone please explain this code in detail? I've tried debugging it but i can't figure out how it produces the result. I've been searching for a solution fo...
[3 replies] Last: I was going to mention this in the first post, but I tried 5,4,3,7,9 a... (by Smac89)
C++ Game Development?
 
Hello. I have wanted to make a game for several years now. I heard of C++ so me and 8 other friends got together and we are now wanting to make a game. We are a...
[12 replies] Last: Thanks racefreak! Same to you and Reboot Studios :) Hopefully teenager... (by CppCoder101)
Codes between Compilers (1,2)
 
HI. I use Turbo c++ with dosbox at home, and i wanted to enter an online competition for writing codes. After i wrote the code, it worked perfectly. But when...
[31 replies] Last: ..oh, right, LWS allows input too now. Calculating factorials up to 1... (by Cubbi)
what did i do wrong? c++ network
 
starting a basic first networking program. Can't figure out where did I go wrong here is the VPNServer.h file class VPNServer { public: bool init(); p...
[4 replies] Last: It'll be a little different depending on your IDE, but basically you n... (by ResidentBiscuit)
prog. only accept integer from 0-10 then it's factorial It's running but it doesn't show the factorial What's wrong with this?
 
#include<iostream> using namespace std; int main() { int a ,x,f=1; cout<<"Please enter an integer [0-10 only] : "; cin>>a ; for(x=0;x<=10;x++){ f*...
[3 replies] Last: Sorry - am not thinking straight (it's 04:20AM here in Melbourne, Aust... (by TheIdeasMan)
ARRAY- Even,ODD
 
I need help. The program requires the user to enter 10 integers then print the total no. of even integer,highest even integer, lowest even integer then total n...
[2 replies] Last: would be easier to make suggestions if you posted your code. The tric... (by SamuelAdams)
Fibonacci Sequence
 
I was trying to create a code to calculate the nth number in a Fibonacci sequence, when the nth number is entered interactively. Any help would be much appre...
[4 replies] Last: I wasn't sure where to start coding in the first place, So should I ju... (by LoopingBird)
by hexori
help with array ?
 
Hi Can anyone help me with this code please ? char a ={A,B,C}; char b ={@,#,$}; i need the output like this : A@,A#,A$,B@,B#,B$,C@,C#,C$ ...
[3 replies] Last: binarybob350 & whitenite1 It works ! Thank you so much , I appreci... (by hexori)
by vrakas
Topological sorts
 
Hello. I am practising on a task to find all topological sorts of a DAG (input is given eg 1 4 5 3 4 2 1 which means: 1st line: there is an edge from 1...
[no replies]
Some Double Linked List Woes.
 
So I'm making a function w/3 parameters (head pointer and two items [x & y]). Then I need to print to the screen all the items between x & y ( including them). ...
[3 replies] Last: Also on line 42 No, not on line 42, it's line 33 It's really odd wha... (by coder777)
February 2013 Pages: 123... 43
  Archived months: [jan2013] [mar2013]

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