Beginners - November 2012 (Page 56)

by Maissa
What to use
 
Hello i just want to know what can i use to add the elements of two given arrays i have tried for and failed big time so did i make a problem or is it not f...
[8 replies] Last: A namespace is simply a reference to a particular context, some things... (by drognisep)
calling class elements inside a class
 
#include <iostream> using namespace std; class Point { private: int x; int y; public: Point(i...
[6 replies] Last: I learned in my C++ course that I can define a constructor like so P... (by msdagiya)
Localizing Newton's root finder
 
Ok so i have a function which I need to find the root closest to x=100. The function is f(x)=x-tan(x) So far I cannot figure out how to localize the program...
[6 replies] Last: Gotcha, Thanks! I see the issue now. I suppose I can fix this by maki... (by rspos330)
Constructor with Exception
 
if i have this: class Number { private: int x; public: Number(int _x):x(_x) { if (_x == 0) //what i do here? if i don't want 0? } } W...
[no replies]
calculation with arrays & loops within for loops
 
Hi, this is the program i am making. I'm not a student of c++ i received this task from a friend who is. I'm doing this for fun, just to clarify that. Howev...
[2 replies] Last: Sorry for the late answer, this did help me in the end and i got the p... (by Terje Gundersen)
Help with this code I used
 
So I creating a program that calculate the mean, median and range of 5 chosen numbers, but I wanted to calculate the min and max number. I had no idea how to d...
[2 replies] Last: Low is correct. The program won't stop just because it's found the hig... (by Raezzor)
Program crashes unless I run it with the debugger
 
I wrote a prime factorization program and it crashes in the while loop. I just get a "this program is not responding" message. The part in the while loop runs b...
[2 replies] Last: I changed it, but I'm still having the same problem: #include <iostr... (by frankm1)
Beverage machine (noob)
 
Here is a example of simple use of switch statements. #include <iostream> using namespace std; int main() { int choice; char y='y'; cha...
[2 replies] Last: What's the point of line 7? You don't use the variable anywhere. (by Raezzor)
Please help (1,2)
 
I have two questions and i do not know how to solve them. Can someone help me please? 1. Create a class named Circle. The members of the class are ...
[21 replies] Last: is it correct? (by steeeeel)
Random Number Generating - Help!!
 
The exercise I'm working on right now is this: Write a program that plays a guessing game where the computer tries to guess a number picked by the user. The...
[1 reply] : Answer removed due to response timeout. (by closed account D80DSL3A)
by FatS
Problem with simple multiple choice quiz
 
I'm working on a simple multiple choice quiz for my end of semester project. Here's what I've got so far #include <cstdlib> #include <iostream> #include <...
[2 replies] Last: Damn me and my typos! :P cheers! :) (by FatS)
Help with the do while loop
 
I have this program #include <iostream> #include <string> #include <ctime> #include <cstdlib> using namespace std; int main() { srand(static_cast<u...
[4 replies] Last: Thanks guys! Really appreciate it :D (by DJLad16)
by amir22
System pause does not work
 
I do apologize I couldn't find out how can I put my codes in <> sings:( Can some one tell me why system("pause") does not work? End of line. #include <iostr...
[5 replies] Last: And you would be right. Thanks for that. (by pogrady)
short simple SDL font program has flaw somwhere
 
i have been fiddling with the font programming just a bit to see how it works, i have the font linkers installed corctly and the font in the folder, the tutoria...
[3 replies] Last: thank you very much, im getting to learn it at last (by devonrevenge)
calculating a simple math algorithm
 
Hi every one, I have to design a simple algorithm and it is to calculate roots of a quadratic equation, it has to read data, post errors if they are not suitabl...
[7 replies] Last: From what I remember, thats standard i/o. Isnt that a C program? I th... (by LGonzales)
Error Help :) [Appreciated]
 
Hey there, I hope I can get pointed in the right direction on this error. Here are my 3 files //fraction.h #ifndef _FRACTION_H_ #define _FRACTION_H_ int gcd...
[5 replies] Last: I think you need to do a clean rebuild of your program. After you ge... (by LGonzales)
[Array Class]:Why is there no segmentation fault with my assignment operator?
 
...Not that I wish it did, but I want to understand why! Hello together, I'm new to this forum because since two weeks I am trying to learn c++. Up to now...
[4 replies] Last: @wedgeCountry That makes not too much sense. You have to allocate the ... (by coder777)
Number guessing game
 
I'm a beginner in C++ and I'm a student and I need help making a simple number guessing game that will give an instruction screen, a scoring system, game optio...
[1 reply] : Start by thinking. Start by doing all the bits that you already can. G... (by Moschops)
by kske
Shuffle and Deal Deck of Cards
 
Can someone look over my code and see if it looks okay. It won't compile for me and I can't figure out what is wrong. It's suppose to randomly assign numbers to...
[4 replies] Last: Nevermind I think I figured it out. I missed a part when i was reading... (by kske)
by dorA26
ofstream
 
when opening a file does ofstream deletes its content by default? If so, how do I cancel that? I don't want to use app, because I need to edit the file between ...
[6 replies] Last: yeah this is working. Thank you! (by dorA26)
November 2012 Pages: 1... 5455565758... 75
  Archived months: [oct2012] [dec2012]

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