Beginners - November 2012 (Page 40)

list.sort()
 
Hey folks, I have a problem regarding using std::list::sort. I wrote my own comparator function below, and called sort with said function as the input parameter...
[3 replies] Last: In this case, you could write something like struct CompareDist { ... (by Cubbi)
by erikn
When to use inheritance
 
I'm pretty new to object oriented stuff and have a tough time figuring out when to use inheritance. For instance suppose a simple graphical game has a class for...
[10 replies] Last: Thanks for the in depth and thoughtful responses folks. This definitel... (by erikn)
by dioing
How do similar picture with two functions ???
 
I'm learn this language into 2 weeks and i don't understand how do this ... someone can explain me ? * _*______ __ *____ ___*____ ___*____ __*____ _...
[4 replies] Last: Here is my five cents. int j = 1; char s = "*______"; char *p = s; ... (by vlad from moscow)
out file for slot program?
 
For my semester project, our teacher wants us to make a slot machine program and he says we must use an out file. my question is what kind of out file do I need...
[3 replies] Last: A outfile is for storing results, a infile would be for determining od... (by SamuelAdams)
How To Check How Much Characters Are Between Certain Characters
 
I have a test soon and want to make sure I'm doing these right. If we have something like this: code a ="la#sdas$lf" How would you make sure there ar...
[7 replies] Last: And one more solution.:) char *p, *q; int n = 0; char s = "##A#B@@... (by vlad from moscow)
by dioing
i'm learn fuctions , and that's the problem !
 
How make two functions to the result is this : * _*______ __ *____ ___*____ ___*____ __*____ _*____ *____ *____ _*____ __*___ ___*___ i don't no how make this...
[2 replies] Last: no no , it's like the picture on top ! (by dioing)
Problem with Program, Calculating area of circle
 
Hello there, I am having a problem with my program. My teacher said I was very close to get the correct answer but for some reason, I can not seem to figure ...
[4 replies] Last: The first time I reach it, it should use the value from "old area" wh... (by Moschops)
How to use Try, Catch, Throw?
 
Hi!, i've been researching a bit about this topic but it's been a little hard for me to learn how to use the try catch and throw. I want to validate a value en...
[1 reply] : For what you're doing here you're better off using the cctype header: ... (by Computergeek01)
where to type in the codes/programming?
 
Hi, I'm totally new to this, and want to learn how to use the c++ programming. i have read the first pages under http://www.cplusplus.com/doc/tutorial/ ...
[10 replies] Last: Ah yup it's the first hit for me :/ (by ResidentBiscuit)
Certain inputs
 
I am trying to grab inputs for time of day and day of week. Time of day needs to be in 24 hour format, ex: 1:30 is 13:30 and day of week needs to be the first...
[1 reply] : This is my code so far, obviously it doesnt work, but it's supposed to... (by t48eagle)
by dioing
what is the problem ? help !
 
#include <iostream> using namespace std; char text ={"Hi friends, good morning."}; char temp; int i; int j; int main() { for(i=0;i<sizeof(t...
[4 replies] Last: That's right, LGonzalez. I forgot c++ don't read this , we have explai... (by dioing)
Pi approximation
 
Hello, Im trying to make a program to approximate pi when a certain number of values is input by the user. The more values, the more accurate. The equation is...
[3 replies] Last: We'll you could, but that expression just flips from 1 to -1 and back.... (by kbw)
by dioing
Why last for cicle didn't in the output ???
 
#include <iostream> #include <string> using namespace std; int n ; int p; int r; int main() { cout << "Will introduce twelve real numbers for ar...
[2 replies] Last: Omg, thank you a lot ! (by dioing)
by mlasa
Simple Number Encryption [Error C2447 and IntelliSense]
 
Hi, I'm having some trouble with a program I'm trying to make for a uni assignment (first year so basic stuff). The encrypting method used is that each digit...
[16 replies] Last: how do i fix the error with the open bracket above the line starting w... (by Ranger751)
Function Problem
 
This is a function I am working on, I think I messed up my brackets but idk where and what I should do. HELP! void sortarray(int hiredate , int employee...
[9 replies] Last: also, remove the semi-colon at line 3 (by Lowest0ne)
by Kodieh
Code not doing what it's supposed to. (String manipulation)
 
Here first is the assignment I am having to complete. You should use either the C++ string object or C-String for this problem. Read content from a file. T...
[1 reply] : s is only updated once. So if s =='#' is ever true once, it is always... (by cire)
f(x) multiple
 
can someone tell me how to input the variable in the calculation without error ? example : if we input 5x and 4x , then we want to multiple the 5x with ...
[5 replies] Last: first of all use code tags, when posting source code if you use "usin... (by Darkmaster)
by Meden
What is wrong with my binary search?
 
// Binary String Search. // This program uses the data from BE0804 to conduct a binary search. #include <iostream> #include <cstring> using namespace std; in...
[5 replies] Last: Thank you. (by Meden)
standard deviation
 
I am trying to write a function to calculate the standard deviation of a vector. I thought I had done it correctly but I get a standard deviation calculation th...
[no replies]
Repeating decimal numbers
 
Is there a way to know if a given number has got a repeating part?
[6 replies] Last: I think I'm gonna write a class to implement those numbers. There act... (by fpiro07)
November 2012 Pages: 1... 3839404142... 75
  Archived months: [oct2012] [dec2012]

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