Beginners - July 2010 (Page 13)

by Rohini
Ofstream not identified
 
Hi, I have got a prewritten project which I need to modify. I need to see whats happening so I am writing the output in a text file.I have included <fstream> ...
[1 reply] : use std::ofstream (you probably need to add the std:: prefix). (by Galik)
<ccc_win.h> no such library
 
i try tis code from book... #include <ccc_win.h> int ccc_win_main(){ point top_left(1,3); point top_right(1,4); point bottom_left(2,3); li...
[1 reply] : Maybe you don't have ccc_win.h on your system, or the compiler doesn't... (by HooklessFastener)
How to establish recurring loop within a return function for Hangman game
 
Hi, I am trying to establish a game loop for my game where if the player wins or loses a game of Hangman he has the option of playing again. I am having difficu...
[5 replies] Last: You have to put that code inside the main function.... you can't jus... (by Galik)
How to append a byte to a string
 
How can I append a byte to a string? string s = "test"; unsigned char b = 0xff; I want to append b to s
[3 replies] Last: All unsigned chars do is tell the compiler to treat it like an unsigne... (by firedraco)
data type conversion
 
Write a program that inputs a dollar amount and outputs how the amount can be represented using the fewest number of bills and coins. For example, $17.74 would...
[1 reply] : What does this exercise has to do with data type conversion? Post some... (by R0mai)
by bobito
Returning an array from a function
 
Hi, What are the different ways of returning an array from a function? Which is the best? Thanks.
[3 replies] Last: Thanks for the replies. (by bobito)
if statement invloving string
 
Write a program that asks the user to input the capital of Canada. If the input is Ottawa, output “Correct”, otherwise, output “Incorrect”. #inclu...
[1 reply] : You can't compare char arrays like this. Either use std::string which ... (by R0mai)
similar (not the same) operators overloading
 
gcc version 4.4.3 (Gentoo 4.4.3-r2 p1.2) why when i am overloading similar operators (like operator+() and operator+(const T&) one in parent and other in de...
[2 replies] Last: Ok, thank you, i've understood this problem, but could you give some r... (by lex4051)
Diffrence Between Win 32 and Console Applications?
 
Hello :D i am new to the whole programming concept, even though i took 3 years of it within my highschool carreer... i would like a basic run through between...
[4 replies] Last: GUI programming in native C++ is grueling at best Qt, GTK+, etc.... (by helios)
Need a hint
 
I have been working on the following problem the entire weekend: Write a program that repeatedly asks for positive integers (values greater than or equal to ...
[9 replies] Last: What Disch said, you've got to reset the value of r to 0 when n>maxVal... (by AdventWolf)
school assignment finding average
 
My problem is I keep getting zero as an answer in my program. The program is supposed to add five numbers and give the average. We are required to have 3 files ...
[1 reply] : 2 problems I see. The data the user is inputing is going into userI... (by binarybob350)
by xyzt
Thinking about Programming in C++
 
In 'The C++ Programming Language', Stroustrup states that: "Another form of commonality can be expressed through templates (§2.7, Chapter 13). A class templa...
[2 replies] Last: It means that something like this: template <class T> class Stack... (by m4ster r0shi)
Finding number of spaces
 
okay, this is very important, here is an example: #include <iostream> #include <windows.h> using namespace std; int numberOfSpaces; int getSpaceNu...
[17 replies] Last: And then there is: size_t num = std::count_if(str.begin(), str.e... (by Galik)
Calculator
 
So this is what I have for a calculator so far... #include<iostream> using namespace std; int main(void) { system("TITLE Calculator"); s...
[5 replies] Last: Haha, not spoiling it all for me. Thanks very much (by koutsos1)
multiple arguments
 
i am writing a program that has a function call that is just not working. tell me what im doing wrong? thanks #include <iostream> using namespace std; in...
[2 replies] Last: Ahh, that makes so much sense. Thanks for the help!!! (by jwhitaker0060)
Easiest way to detect key press (non-console) (1,2)
 
I tried looking at hooks and immediately got confused, I think I'll set that topic aside for later. I want to detect if a key is pressed, and if it is I want...
[20 replies] Last: Check this out, it might help -> http://cplusplus.com/forum/windows/26... (by m4ster r0shi)
Plotting points by coordinates.
 
Hello everyone, I'm working on a shortest-route finder program and I've gotten most of it to work. However, to verify my results, there is currently a tediou...
[3 replies] Last: Hello, Thank you both for your answers. Duoas' option seems the eas... (by Gaminic)
by dan0
Compiling and Linking
 
I'm unclear on how to compile and then statically or dynamcially link object files. Can anyone direct me to resources -- books, websites, etc. -- that can h...
[no replies]
Delete
 
hello, i want to delete structure array but not all but element of it , to more understand look this part of code struct patient { int ID; char n...
[3 replies] Last: Like this: #include <iostream> #include <string> #include <vecto... (by m4ster r0shi)
simple algorithm needed
 
Hi everybody! I am I course IT student and I have some experience so I do not expect the program itself but only the idea please. The program I must crea...
[1 reply] : Represent your words as string/index pairs (index is the position at w... (by Athar)
July 2010 Pages: 1... 1112131415... 31
  Archived months: [jun2010] [aug2010]

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