Beginners - September 2012 (Page 11)

getfile from text
 
struct Stock{ string stockTag; double currentValue; double numberOfshares; }; void readStocks( Stock *& ); void showStockDetails( Stock *& ); int main(){...
[18 replies] Last: i done my selection sort and bubble sort , because i done with few som... (by BasicNewbie)
Where to find the win api help file?
 
I've been searching the web for a long time now trying to find a reference to the WINAPI for programming Win32 GUI's. I found some help at modula2.org but it se...
[2 replies] Last: Thank you!!!! (by Hashimatsu)
error using getline
 
cout << "Enter your full name: "; getline(cin, name); if write it in main it works, but i need it in a class and when i write it i...
[2 replies] Last: thanks vlad you are always so helpful ,just corrected it and now it's ... (by Kronolynx)
OpenGL / GLUT help
 
Hi. I'm creating a program in which a triangle is drawn on screen using OpenGL, and the area of the triangle is drawn on screen along with the height and base. ...
[5 replies] Last: So in that case, would I want to move the glutPostRedisplay() from Dra... (by ribenaman)
error: 'char* Character::getName()' cannot be overloaded
 
In my project some methods require a string, while others (like my SDL stuff) require a char* In my code I have this: character.h public: <some oth...
[5 replies] Last: They do? I thought one returned a string and the other returned a cha... (by cire)
by Howlz
turning my code into a function and how to call on it
 
Here is my code and it works perfectly. Now i just want to know how to turn it into a function and how to call on it. This code arranges 5 numbers in an array i...
[3 replies] Last: You can return some sort of aggregate or structure containing the valu... (by Owain)
Programming face cards and aces
 
I am supposed to make a program that adds up a players blackjack hand. I am having trouble with the face cards and the aces. How do I make it so that when the...
[1 reply] : I'm pretty sure that an Ace is always 11 until it would cause the play... (by Texan40)
Algorithm needed
 
I'm banging my head on this one. I have one more function to write for a project, and I just can't figure it out. I have to take in 2 integer arrays that re...
[2 replies] Last: Duh! *facepalm* Totally understand it now, Thanks! (by enosmac)
PLEASE HELP Text to morse code translation
 
Hey all. So I wrote a program to convert ONE letter or number into morse code. That is, a user can input anything from A-Z, a-z, or 0-9 and have the morse c...
[4 replies] Last: Ok, I fixed the program but I am still getting an error message (Actua... (by pianolover444)
Sort program
 
Me again and this time i'm working with 2d arrays I'm trying to figure out how to infile data into a 2d array so I can sort it I need to sort it by name...
[no replies]
problem here
 
#include <iostream> using namespace std; int main() { double a = 0.1, b = 0.3; double res = ((a + a + a - b) * 1e17) / ((b – a – a - a) * 1e17); cout <...
[1 reply] : No, problem is there.:) The problem is that 0.1 + 0.1 + 0.1 < 0.3 bec... (by vlad from moscow)
by febeme
HELP! My program isn't working!!
 
Hey all! Now I'm new with c++ language, I'm trying my hardest because I am a computer science major but my program isn't working correctly. I'm so frustrated wi...
[1 reply] : How do you expect us to help you when we don't even have any code to a... (by closed account zb0S216C)
by YeoYeo
Program hangs, why? bit puzzled?
 
Hi all! Trying to learn c++ using Pearsons C++ How to program book. I'm currently stuck on this question from chapter 5. I have to use a sentinel value to...
[1 reply] : Change this statement cin >> productNumber >> quantitySold; ... (by vlad from moscow)
how do i write a program like this?
 
i am trying to write a program that asks for user's name after the user enters his name, the length of his name will be displayed. char Name cin>>char Name;...
[4 replies] Last: When a string is given as input, the compiler will append a null-chara... (by closed account zb0S216C)
Function only returns true, why?!
 
I'm trying to perform a binary search on a sorted vector for a homework assignment, but it's not working. These are my two functions which compare entries:...
[7 replies] Last: I removed the first equalAlpha test on mid at first (as suggested) ... (by cire)
finding perimeter of half an ellipse
 
In this program i am trying to find the perimeter of an ellipse and even when I try switching one number I still get the same answer. I know it is not correct b...
[6 replies] Last: if the second formula doesn't work quite right, try this instead: doub... (by Ben Brown)
Strange math error in otherwise simple program
 
I'm pulling my hair out over this one. This program is simply supposed to take in two user supplied numbers and use them as the basis of a Fibonacci growth sequ...
[3 replies] Last: Sorry about the lack of code tags. I'm still trying to get used to thi... (by SeizureChavez)
Fix my Function to find first digit, last digit and number of digits in integer.
 
Beginning programmer and struggling to understand the concepts. We have to create a function that finds the first and last digits of an integer and the number o...
[4 replies] Last: It would be even better to rewrite the function the following way in... (by vlad from moscow)
How to make delay time in dev c++?
 
so anyone know how to give delay time in dev c++?
[2 replies] Last: And if you are on Windows, you can use void Sleep( int Milliseconds )... (by Fransje)
integer division
 
What is the formula you would use for integer division in type double? Also what formula would you use for modulus? I tried fmod(Op1,Op2) but it wouldn't work ...
[1 reply] : int x = 10; int y = 3; x = x / y; double x = 10.0; double y = 3.0; ... (by vlad from moscow)
September 2012 Pages: 1... 910111213... 62
  Archived months: [aug2012] [oct2012]

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