Beginners - September 2009 (Page 3)

Loading arbitrary files
 
Hi. Why can't I do: class b { public: b(string file) { filehandle.load(file); } private: ifstream filehandle; }; When I instan...
[3 replies] Last: sorry. I of course meant filehandle.open(file). That did it. Thanks ch... (by crimshaft)
multi character character constant
 
have no idea why this message is appearing. I only started learning C++ yesterday so need some help. i'm pretty sure the program is correct but it malfunctions ...
[1 reply] : cout << '\n ' << "what is your next guess. : "; You have a sp... (by Chewbob)
Input Letter, Output Word
 
Homework problem. Have To: Use functional decomposition to make a program that inputs a letter and outputs the corresponding International Civil Aviation al...
[3 replies] Last: Alright, thanks alot, both of you. : ] The whole char/string thing ... (by SeeSayLeki)
Sentences in Strings
 
So I'm fairly new to C++ and I'm having a bit of trouble getting a full sentence in a string. The program works just fine when I enter just one word without any...
[1 reply] : Well as you said its "fine when i enter just one word without any spac... (by mcleano)
by tkausl
const char * functions
 
hello. i have a const char * this is a chat and the text is in the variable now i must search in this variable. if this variable is "/login abc def" then i ...
[1 reply] : i think strbrk works (by hannes)
Copying DynMem and Custom Member Functions (a walk function)
 
Hi im new here. After studying php and pygtk for a few years I thought I would give c++ a go and ive been impressed with it so far. Im trying to write a basic t...
[2 replies] Last: Excellent. Just what I was looking for. Thanks for the help. (by SteadyEdd)
Using Member Functions
 
This time class is driving me crazy...How can I get this program to calculate how long I have to wait in hours, mins and seconds for lunch and dinner using 'dif...
[3 replies] Last: Well here is the rest of the program that I previous omitted... #i... (by CATCH3624)
Graphics moe text....
 
Is graphics mode text possible in a console....like vertice Sans Serif.....
[4 replies] Last: Read your terminal's documentation. (by Duthomhas)
by zsukal
how to use ifstream in header file
 
I write header file: class FileOperation{ public: FileOperation(); public: bool nextLine(); public: void setFileName(char* fName); public: char*...
[5 replies] Last: Oki, i have new code it do what i want ;-) Only change this method ... (by zsukal)
What is Debugging and releasing?
 
What is Debugging ...Releaseing....how are they done using codeblocks......
[1 reply] : When you build a program in Debug mode, you have additional informatio... (by Bazzy)
by Null
bit manipulation
 
Hello, i need some help regarding bit manipulation. My question is How can I clear all bits in a byte except last two. So if I have a byte like this: 11...
[1 reply] : int data = 0xd7; // 11010111 int mask = 0x3; // 00000011 int ma... (by screw)
Random quotes
 
Hi everyone! I have a question. I'm now making a program (in C++ ofcourse) which prints out some funny quotes on the screen, not very hard to make. But here ...
[7 replies] Last: Thanks alot! Works perfectly! This is what I was looking for, thanks a... (by Splinter007)
strange compiler error
 
cout << "The surface area of the prism is" << (2*l*w + 2(l+w)*h) << new; Error: 393 H:\System\Apps\99C9C363-29BD-4D65-A572-7BD4152CA87A\Data\sat. sep,26 09...
[2 replies] Last: And after what people told you in your other thread, why are you still... (by Chewbob)
by eiba
How many times to they cross the finish-line? Calculation
 
I'm trying to make a program that calculates how many times the athletes have to cross the finish-line when they are running a (for example) 500 meters race, wh...
[2 replies] Last: That solved it. Thanks! (by eiba)
by r3n311
cin.get(cin.rdbuf()->in_avail()+1);
 
what does this code mean?, i am using this code for devc++ to pause at runtime and closes if u hit enter.
[1 reply] : It gets all of the characters from std::cin that are currently in it, ... (by firedraco)
using cin.getline() with fstream
 
cin.getline() is working fine, if you would look at your output, notice it has a newline after your file name. This is because cin.getline() is getting the '\n...
[2 replies] Last: !? I remember actually replying to a topic with the response... O_o ... (by firedraco)
by sparky
Returning memory location?
 
Hello, How do I return a memory location from a member function of a class? Any assistance will be really appreciated. char *ClassName::memberFunctionName(...
[5 replies] Last: Glad to have been of help. :-) (by Duthomhas)
by baross
Fumction not calculating correctly.(-16*time) ^2+initlal velocity+height.
 
#include<iostream> #include <cmath> using namespace std; double VelocityCalculation(double initialVelocity, double time) { const double ...
[1 reply] : return exp(Position_EQUATION * square)+ (startVELOCITY * time) + tall... (by helios)
by Shane
Is my compiler defective?
 
So today i got bored so i decided to write this simple code to see what happens: int x = 7; int y = 22; int z = 7/22; cout << z << endl; Result:...
[4 replies] Last: He meant 22/7 not 7/22. (by Zaita)
Error! Assert failed
 
I'm making a C++ game and I'm stuck in an error: The following text: "Assert failed at line 74 of src/readbmp.c This applicationhas requested the Runt...
[2 replies] Last: Also, you have compiling a .c file (which is C code), which contradict... (by firedraco)
September 2009 Pages: 12345... 23
  Archived months: [aug2009] [oct2009]

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