General C++ Programming - March 2012 (Page 12)

Sphere formula
 
Hey, does anyone know or maybe have a formula for drawing sphere?Like, I need quads vertices. Other stuff I bet I can work out. I tried getting vertices data ...
[5 replies] Last: From increasing theta then increasing phi. When viewed from the top i... (by Stewbond)
by Yanik2
what is the value of the basisLetter @ the end?
 
what is the value of the latest basisLetter? #include <iostream> using namespace std; int main() { char basisLetter= 'a'; for(int rij = 1; rij <=4...
[2 replies] Last: i've already tried to run the code n i still do not get it. Can someon... (by Yanik2)
by hannah
Flipping a coin
 
Hello, Just a beginner! I've got a darts game between two players. I need to work out how many games player 1 wins and player 2 wins out of 1000 games if there...
[2 replies] Last: It's a little difficult to understand exactly what you're trying to do... (by Zebulun5)
by TiiG
FTP upload not working
 
#include <wininet.h> # include <windows.h> int main() { HINTERNET hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0); // ...
[1 reply] : Include windows.h before all other headers. If it still get syntax err... (by modoran)
by Zapeth
Boost.Asio - how to queue incoming messages?
 
Hi, title is my question. I have a server that uses asynchronous read/write operations to interacting with any connecting clients. It works good so far, howeve...
[4 replies] Last: ok...I will try to play around and see if I get it to work, if not I'l... (by Zapeth)
I need a hand with functions.
 
Hello I am trying to write a simple program that basically tells a user whether the number they entered is prime or not. The code looks like this and I can't fi...
[6 replies] Last: I'm not sure why I need i++ or i <= sqrt(n) i++ , will increase ... (by Nisheeth)
by bfpri
Failing to understand pointers?
 
I have a vector of Linked list pointers. Each LinkedList has a head pointer which is a pointer to a Node. That node of course is the head of the list. ...
[1 reply] : How is your list implemented? I'd expect the second line to do what yo... (by hanst99)
Algorithm efficiency
 
Would these functions be considered O(1) (in terms of Big-O notation)? void Stack::pop() throw(StackException) { if (isEmpty()) throw StackException(...
[1 reply] : First is O(1) Second is O(1) in case 'items' as an array. Of course, i... (by elflesnoy)
ofstream fails to open file for output
 
it is failing on the 1022 symbol read. // 1022 is the count of the current symbol to download history for. // 1021 symbols have already been downloaded with...
[no replies]
OBJECT ORIENTED ANALYSIS UML
 
BELOW IS QUESTION DESCRIPTION AND THE UML DIAGRAMS THAT I HAVE MANAGED TO COME UP WITH BASED ON MY UNDERSTANDING. CAN SOMEONE PLEASE REVIEW IT AND TELL ME IF T...
[no replies]
Need help with calculating gpa
 
need help with this program that is telling me to calculate gpa This is the test data and output http://tinypic.com/r/1zccyue/5 this is what i have so far....
[no replies]
by vextes
Quicksort issues
 
Hi, I'm new here, and I'm pretty new to c++ as well. I have been attempting to write a function for the quicksort algorithm, but for some reason that I haven't ...
[3 replies] Last: Hi, I write the code in c, this is the random quick sort. #include <... (by w397090770)
Pointers and Linked Lists
 
Hi all, I'm sure this is a pretty basic concept to everyone but I'm having trouble in my Data Structures class bc I just don't understand all the uses of poi...
[3 replies] Last: Do you understand what this means? (*SomePointer).SomeMember It's ex... (by LB)
Problem With Calculations
 
I'm trying to write a program that calculates the mean and standard deviation for a set of numbers. I broke the calculation down into a couple parts, and for so...
[2 replies] Last: Its because you are haven't calculated your mean. You are just using 0... (by Pravesh Koirala)
Encapsulation
 
So here's the thing. Today we had our exams (C++ of course). There was this question, Do friends violate encapsulation? To be honest, I don't even really know ...
[3 replies] Last: I'll just say this (somewhat unrelated): A class doesn't have to encap... (by closed account zb0S216C)
qsort multiple fields on struct array
 
When I add another field on my struct, it does not sort properly. But if there is just one field it will sort it perfectly. //----------------------------...
[no replies]
by idks16
scoring a blackjack hand
 
i'm making a program that scores a blackjack hand but i don't know how to make ten, jack, queen, and king to have a value of 10 when the user has one of these i...
[1 reply] : Eh 10 if player has one dressed card. Isn't jack queen and king always... (by liquidfuzz)
A telephone program
 
I am writing a program that outputs a digit based off of the letter entered and am stuck on the two most important parts. My professor wants me to output a hype...
[1 reply] : Did I need to use a switch in this instance, this would be more effic... (by Azagaros)
by ckdk12
How to get character from keyboard within a period of time
 
Hi guys. I'm having a problem with my project. I'm writing a quiz game that player must type the answer in the console windows within 10 seconds. So how can i u...
[8 replies] Last: windows vista or 7, whats cc and term? anywho no idea what is waitfor... (by wtf)
basic declaration question
 
Class MyClass { }; int main() { MyClass a; MyClass b(); } What is MyClass b()? Is it a function declaration? Thanks.
[2 replies] Last: Vins3Xtreme is mistaken. It is in fact a function declaration. The f... (by Disch)
March 2012 Pages: 1... 1011121314... 49
  Archived months: [feb2012] [apr2012]

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