Beginners - November 2010 (Page 7)

Using strings with ofstream
 
Hello, I'm trying to write a roguelike as a way to learn the language. Right now, I'm trying to write a string to a file as part of a save file function. I'v...
[1 reply] : Hi again, I sorted it out. I decided to just cout << name.length() ... (by Fuzzy Fungi)
by GulHK
redirect cout to a file
 
Hello everyone I am actually working on someone else's code. I have to work on the output generated by the two methods from that code. I am trying to redirec...
[3 replies] Last: What happened when you tried to redirect to those files? Did they alr... (by Bazzy)
PlaySound function
 
I was looking around for a post about playing sounds with the running console, and the easiest way I found is "Playsound" function in <mmsystem.h> library. if a...
[5 replies] Last: yeah i have it in the same directory, the program i'm working on is a ... (by amr fci)
Fahrenheit - Celsius programming error.
 
Below is a program I've written to convert a Fahrenheit value that the user inputs into the console window into the Celsius equivalent. Although the only answer...
[3 replies] Last: I'm not sure if you are using C or C++. Well with Dev-C++ I do this: ... (by qaz123)
for loop and ASCII table
 
I'm new to programming and I would like some assistance on a little project I am doing for my class. I'm not asking for anyone to do the work for me but I just ...
[3 replies] Last: if (i == 0) cout << i << " " << "NULL" << " " << "||" << (i % l... (by ne555)
by mozly
Simple pointers (dynamic memory allocation)
 
Im having difficulty with a program that needs to create a certain number of objects depending on the value of variable. Im working in c++ I want to do this...
[4 replies] Last: Blargh, screw new , use malloc, a loop, and a init function if you ne... (by rocketboy9000)
My Functions are not passing their references
 
I am only able to get one reference passed back to the main function however it is causing an indefinate loop could someone please help!!! #include <iostream...
[no replies]
Inline assembly reading contents of an array
 
Hi everyone I need to read an array which I have already placed values into and add the contents of the the array together. I am assuming it would work i...
[2 replies] Last: Thanks Shredded, when I said inline assembler I meant assembly code do... (by assemblyman)
by GOct
Function that will return string or double
 
Hello, I was wondering if it is possible to have a function that can return a string or a double. Something like: function getE(int i) { string ss="tst...
[4 replies] Last: Why exactly do you want to do this? (by Galik)
Open GL logic is like console
 
how does Open GL listen for events?, and generally, it seems that working with it is different in comparison to console
[1 reply] : OpenGL does not listen for events. Your window manager listen for even... (by GOct)
Access derived template class of a template class
 
I'm having a problem inheriting data members from a base template class. template<class T> class DepthLayers { public: int test; DepthLaye...
[3 replies] Last: I meant that the way your original post was written MSVC would accept ... (by guestgulkan)
Working with binary
 
Is there any "standard" way to store data as binary?
[4 replies] Last: Uhm, ok, I'll use bitwise operators. Thank you for helping me o_~d (by Tarou San)
by wtf
How to clear just the eof flag of a file stream
 
i tried doing this: if ( (file.rdstate() & fstream::eofbit) != 0 ) file.clear(fstream::eofbit); But it does not seem to work.
[3 replies] Last: XOR: file.clear( file.rdstate() ^ fstream::eofbit ); will toggle the... (by Bazzy)
hotel management program problem
 
in this add and modify in customer records in edit menu are not working properly as the contents are not being displayed .only 1 record is displayed and others ...
[no replies]
by GulHK
linux makefile
 
Hello everyone. I am sorry for posting my problem in the wrong forum. I posted this problem to the UNIX/Linux Programming forum but I think not many people visi...
[6 replies] Last: I expect that's because -lmysqlpp was missed off. It should probably ... (by kbw)
by firix
create a class to read and write to the file
 
Hi Guys, I want to create a class to read and write to the file. but I could not. Can you help me class Myfile { fstream files; public: Myfile(ch...
[2 replies] Last: I know the files, but How can I use in class. (by firix)
Problem with virtual drive
 
I have a problem with sorting. I can't make the sorting function. I tried void SortContentDescending(Fat& fat, Data& data) { cout<<"Sort Down By Name"<<e...
[no replies]
by Lubi
Memory Analysis of Stream cipher SNOW 2.0 using C++
 
any one have idea about how to analyse memory of a software using C++ , or is there any algorithm to analyse memory plz plz do help me Regards Lubna
[no replies]
by ARWA
function set..dont now how to do it???
 
hi, im stucked in doing the function set of my class which takes to daynamic arrays as data member ...now if the client prog wants to set the 2 data members wh...
[4 replies] Last: ok, thanks i will try it ^__^ (by ARWA)
String Pointer Question
 
Hi. I don't have much experience with this, and I am having trouble getting this function to work. It's purpose is to print a question and ask for a response. ...
[6 replies] Last: Of cuz if you want to use & when calling you do something like below. ... (by sohguanh)
November 2010 Pages: 1... 56789... 42
  Archived months: [oct2010] [dec2010]

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