Beginners - September 2008 (Page 10)

Error: Program too big to fit to memory
 
Hello, This is my first post and I'd love some help. I have WinXP SP3 and am using MinGW as my cpp compiler. I'm trying to write a cpp program that makes cha...
[5 replies] Last: Try Dev C++ Really simple to use and works pretty well. (by bluezor)
New to C++ Classes design
 
Hi guys! Thanks for moderating such an informative forum...this has become my best resource for c++ info! I'm having what should be a familiar problem to an...
[3 replies] Last: I have a couple of comments. 1. By deriving Scanner from Token, yo... (by jsmith)
by Syx
Countdown timer
 
Hey guys, I was checking out this countdown code http://www.cplusplus.com/reference/clibrary/ctime/clock.html to try and incorporate it in my game source code b...
[5 replies] Last: Thanks for the replies. @helios Actually, I'm not using any game ... (by Syx)
Structures and Classes
 
Hi. I don't understand what the difference between structures and classes. Can anybody explain it, please? Thanks.
[5 replies] Last: Default access in a struct is public and in a class is private. Othe... (by helios)
by pino
about cin
 
I’ve not understood the working of cin. Given the following example int main() { int ival; while (cin >> ival, !cin.eof()) cout << ival << endl...
[3 replies] Last: cin is for taking input, I would say avoid using it as an arguement ... (by Umz)
How in the world would I create a code for this...
 
Create a C++ console application that converts a time entered in minutes into either a hour/ minute format or into seconds. The user interface of the progra...
[4 replies] Last: bluezor: We generally try not to provide code for people who ask quest... (by jpeg)
by mlussi
Question about string replace [solved]
 
Greetings It's me again, with a question about string replacement. Here's my code: int textfragment(int typ){ string text=getfragment(typ); ...
[8 replies] Last: Alright, if "txt.find(find)" had no result it returned "-1". -1 is "ou... (by mlussi)
Console Flicker
 
So i have a game similar to space invaders and there is an enemey ship that scrolls across the top of the screen. every time it moves, the screen must be cleare...
[1 reply] : Use ncurses and similar libraries to get that kind of interface. Alte... (by helios)
Writing a code for incorrect input
 
I am new to C++ and have gotten an exercise to do but dont know how to do it..... Write a program that: Prompts for: • The user to type two decimal numbers...
[2 replies] Last: thx it worked.... (by mbangur)
by sfx81
Simple exception question
 
hi. I started learning exceptions just now. The following program crashes without entering catch block, I was wondering why... Any help try { int *p ...
[6 replies] Last: It is an (unfortunate, IMO) part of C++'s design philosophy. Page f... (by Duthomhas)
sorting two parallel arrays
 
Hi, I have a text file with two columns: date and grades. I want to read in the file and bubble sort the data by either date or grades. What I've done is to re...
[1 reply] : 1. You mean like, a being a Class, calling atol(a)? If you do, then no... (by helios)
An Error
 
The compiler gives an error at 19th line: C:\Users\toshiba\Desktop\CPP\Empire\CharacterCreator.cpp variable-size type declared outside of any function The c...
[3 replies] Last: If you want to use dynamic allocation, do so inside a function. E.g.: ... (by helios)
Square Root in c++
 
Hi, this is my first post on this forum! I've just started to program in c++ in school, and I've already got a question, that I just can't seem to find out on t...
[6 replies] Last: Yeah, helios is pretty much right. I mean, there are methods for loop ... (by jpeg)
1st C++ Project
 
Hi all. I am brand new to C++ (3 weeks). I just got my first project to do. Basically the instructor wants us to write a program that reads in numbers similar t...
[3 replies] Last: For this project, design and implement a Visual C++ .NET program that ... (by MTWill18)
Visuals
 
Hi,I've been working on a simple program lately and I want to make it look better , I want to look like it's a program instead of console application , what too...
[6 replies] Last: You now need to add an event handler for the control. To do this you g... (by Dudester)
Can't obtain the result
 
Once again hi. I have tried to make a simple program to tell me the area of a circle. I was able to make it till where I can insert the data but unfortunately...
[6 replies] Last: ah, yes. Obviously I am more used to printf :-/ endl flushes the bu... (by jpeg)
by Umz
Strings and character sequences
 
Is it better to use strings or character pointers to take input? I've only learned how to use character pointers as I'm learning from a book, are strings compli...
[3 replies] Last: I asked because you could mean security as in which one is harder to c... (by helios)
selection sort
 
Two questions here 1.When i run this selection sort function it is not sorting the whole vector. It is only sorting the first few 2.When i compile this i ge...
[4 replies] Last: Oh, look at that. I missed it. The for i loop is also too long. It sh... (by helios)
by rahs08
recycle in permutation
 
hello, dear all. i'have small problem. here is my algorithm #include <stdio.h> /** Read a number, n, from standard input and print the permutation...
[8 replies] Last: Sorry, misunderstood what your program did. If thats the case just mov... (by Umz)
by jd254
String Comparing problem... I don't know why it's not working.
 
#include "stdafx.h" #include <iostream> using std::cin; using std::cout; using std::endl; int main () { char key = "apple"; char input ; c...
[3 replies] Last: Your problem is floating point roundoff error because .01 is not exact... (by jsmith)
September 2008 Pages: 1... 89101112... 16
  Archived months: [aug2008] [oct2008]

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