General C++ Programming - February 2013 (Page 41)

Strings
 
What is wrong with this program? #include<iostream.h> #include<conio.h> #include<stdio.h> void count(); void main() { char c ; cout<<"Enter...
[2 replies] Last: Oh yes..thanks for that :) (by Winkerd)
What is a MUD?
 
For years I've wondered, programatically, what a MUD is. It's like a program constantly waiting for your input, and when that input is finally given -- it co...
[1 reply] : The way I implemented my MUD was to have basically a list of a bunch o... (by Zhuge)
Program that counts number of occurrence of a letter in a file
 
Please help me with my program. I need to create a program that asks the user for the filename, then counts the number of occurrence of each letter in that file...
[2 replies] Last: yes that was my idea all along but i was thinking that there might be ... (by SilentNoise)
class with random generator
 
I have a wierd question: I have a class the generates a random number, do I put the radom generator function in the .h or .ccp file?
[1 reply] : In a .h file, because you want to include it somewhere else. (by majidkamali1370)
Returning in a menu
 
What I am trying to make is an opening menu for a game. It's in working condition but not ideal. I listed most of the menu options as cases in a switch. I'm jus...
[3 replies] Last: Maeriden is a genius. I wrapped the whole code in a for loop then put ... (by hatefacecore)
by Wuten
C++ Buttons not working?
 
Hello, I'm new to this site, though I've looked to it for answers to many of my questions regarding C++ coding, though something is stumping me right now and I ...
[1 reply] : Nevermind, I found the issue; I marked the second y as >375, rather th... (by Wuten)
Won't go to else statement
 
I'm trying to get this program to receive a response from the user of "Y" or "NO" or something similar. The program checks the conditions properly for the "N" b...
[5 replies] Last: Else, savings == 0 The if on top is SavingsBalance > = 0; If you sav... (by greenleaf800073)
Need Help With Making Fractal Terrain
 
I've been in the process of making a simple acii game and worked out to make random terrain that wasn't all that bad (but has some flaws and is not very efficie...
[no replies]
Why am I getting Unresolved external when using Static in a class
 
I have this Main program that calls a class in a header file. #include "SavingsAccount.h" int main() { // Since this assignment purpose is how...
[8 replies] Last: Cire, computerquip, You are correct, the declaration should be outs... (by mendozae)
by Owain
Is Effective C++ still a good book to buy?
 
Hello. I was considering buying Effective C++, Third Edition - but being published in 2005, I realize that it is now out of date (with C++11 being released). De...
[4 replies] Last: @Owain yes, all three are essential mid to early advanced level C++ bo... (by Cubbi)
Inheritance Best Practice? (custom number classes)
 
I am currently working on creating my own classes to deal with numbers. My motivation is two-fold: I use Matlab a lot as a student, and I would like to have a l...
[1 reply] : Perhaps I should add that eventually I would like to add classes for C... (by alcaz0r)
I need help declaring values
 
I'm in a beginners programming class and we have not went over a lot being that school just started less than 3 weeks ago, but can someone help me declare the v...
[4 replies] Last: First error, dimes_value and etc. If you have a constant, you need to ... (by greenleaf800073)
write program to find area of a square
 
I'm new to c++ and I have no idea what I'm doing. My assignment is to Please write a C++ program to find the area of a square, input the length of the side, and...
[3 replies] Last: #include <iostream> //basic libraries #include <cstdio> #include <cs... (by greenleaf800073)
tripple for loop problem
 
I can't tell what this is doing. I need a for loop that sums up the product of several arrays. I am just going to post what I have and then explain. in...
[2 replies] Last: do this: cout.width(3); //column witdh (by greenleaf800073)
can somebody help me simplify this code please?
 
can somebody help me simplify this code please, so that i only have to declare each monster and move once, i know its in Javascript, but i think it can pretty e...
[4 replies] Last: I can't help but another place to try and get some good help would be ... (by Elidor)
What is wrong with my program?
 
#define percent 0.01 #include <cstdlib> #include <iostream> using std::cout; using std::cin; double percentify(double PBP) // Percent Before Percentif...
[2 replies] Last: First, do new line it's \n, not /n. If you can't remember that, do co... (by greenleaf800073)
by takzee
error reading characters of string
 
#include<fstream> #include<Windows.h> #include<cstdlib> #include<iostream> #include<string> #include<iomanip> #include<sstream> using namespace std; void ad...
[1 reply] : Please make a test case! http://en.wikipedia.org/wiki/Test_case Or in... (by closed account S6k9GNh0)
by Xwow
Question about object spawning and deleting
 
Hi, I,ve been trying to create my first videogame with SDL multimedia library and used various training websites especially at lazyfoo.net. Iam having a proble...
[5 replies] Last: Don't use pointers and manually managed dynamic memory where it isn't ... (by cire)
split date char array by delimiter
 
i have a list of date format 1-12-2011 that i get from a txt file. char date ; fstream fin("date.txt"); fin >> date; how do i split the date array to ...
[2 replies] Last: Using strtok() should resolve your problem. #include <stdio.h> #inc... (by ajh32)
Really small doubt
 
I am confused b/n two kinds of main() functions, int main() and int main(void) and I am somewhat good at c++. Both runs the same code without error. My questio...
[3 replies] Last: Why not line 15? I know C++ and in C++ if foo(3) is given, where c is ... (by thiduck)
February 2013 Pages: 1... 3940414243
  Archived months: [jan2013] [mar2013]

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