Beginners - July 2012 (Page 22)

Binary File example
 
Could someone send me a short example of reading an integer from a binary file? I can't seem to accomplish this. Thanks for your help.
[3 replies] Last: It means if you take that file to another computer (e.g. send over the... (by Cubbi)
Abundant numbers
 
I have a function to tell if a number is abundant, as defined by Project Euler Problem 23, but my function is saying that all numbers are abundant. I'm thinkin...
[2 replies] Last: I found the problem now. Thank you. (by GRex2595)
Circumference Formula
 
Okay, I'm making another formula to calculate circumference...but now I'm messing with if/else statements (I forgot the proper term for that, sorry). Because o...
[3 replies] Last: Thanks a lot! (by Zincott)
Inventory system for a text based RPG
 
So I have been working on this as part of a school assignment that's worth almost the entire course (min. 14 credits to pass, there are a total of 24 I could ge...
[5 replies] Last: I rememer now; I was missing an inventory slot (put down 7 instead of ... (by tyriuth)
Class objects and allowing use globally
 
New to c++ and though it would of paid to spend alot more time on smaller projects and learns the basics, i have already leapt into developing an rpg, however a...
[5 replies] Last: if you then want to change values held within the objects... Use mem... (by soranz)
by Dns
String value inside an array inside an if statement!
 
I'm trying to check if an element inside an array has a char/string value inside an if statement and I write: string names = {"name1","name2","name3","name...
[1 reply] : never mind, for some reason it worked now! Thanks :) (by Dns)
Simple question
 
Can't figure out why biggest changes every time...it is only supposed to change if ary is greater than value in biggest. What did I do wrong? #include <io...
[7 replies] Last: Okay, it's kind of icky code at the bottom of the outer loop, but it w... (by vanllabean81)
structure help
 
/* Can someone just help me get started with this, and show me how to go in the right direction. Here are my instructions Use a struct to store all of th...
[2 replies] Last: here is my .h code. but when i place it into my .cpp file it is tellin... (by atown282)
Largest/Smallest
 
Okay so I'm reading this book I've had for quite a few years.."How to program c++" by Deitel, sixth edition. This exercise is one of the first few the author...
[5 replies] Last: Any other suggestions? #include <iostream> using namespace std; i... (by ProjectDoodle)
File I/O problem (1,2)
 
Ok here I am back again. I try to create a .txt file using ifstream and ofstream. #pragma once #include <fstream> #include <iostream> void createProfile(int ...
[21 replies] Last: When I write more into the file wouldn't I need a Array anyway? Act... (by Lowest0ne)
The next step...
 
Hello, I have recently finished reading 'C++ without fear' by Brian Overland. The book was extremely useful and very well written. It teaches the basics of C++...
[2 replies] Last: Thanks for the advice, not really sure which I am leaning towards at t... (by Topdog2904)
by Brody
Vector return copy
 
Would the follow produce two copies of a vector? One right before the return and one right after? If so, is there a way to do this with only one copy? Thanks...
[5 replies] Last: what it is called? It's called copy elision. There are many flavors ... (by Cubbi)
by Chubbs
Innaccurate values
 
Hello, I'm having trouble getting my program to send back accurate values. It works, but is inaccurate, especially with values of 10 or 1000. If I have grade 1...
[1 reply] : bgrade is replaced every time you go round the loop, so if the last gr... (by Moschops)
Serialize dynamic memory
 
Hello. I don't know how to serialize (in binary mode) a struct with dynamic memory by the method ofstream/ifstream, I was searching in the net, but I can't fin...
[9 replies] Last: Solved. Here is the final code: #include <iostream> #include <fstre... (by rodrigoloc)
new to c++
 
sir i am new to c++ and i have tried my begining 4-5 examples on devc++ and turbo c but i have a problem with turbo c that console window closes instantly plea...
[3 replies] Last: I think you're looking for this thread: http://www.cplusplus.com/foru... (by Moschops)
if statement not working
 
Hi guys. I have basically written an encryption program that works perfectly except when I try to include punctuation. I narrowed down the problem to being some...
[3 replies] Last: Replace cin >> test; with getline(cin, test); and watc... (by LimeOats)
Basic Game: can someone tell me if I can write this code a little more efficient...or any pointers
 
Hello. This is just a basic game: rock, paper, scissors and it started to get a little cloudy to code after a while. I just want to know if this code can be wri...
[4 replies] Last: Thanks bmiller. Helped a lot...especially the while game loop (by dtaqee88)
by Arcand
Nothing being sent to the console window & help understanding a few lines of code that I cant seem to get a work around using.
 
I will say this upfront this is a homework piece, although I have not only been given permission from my tutor to ask online but he has suggested it when I run ...
[3 replies] Last: done. thx jose. how bout an answer to my problem! =+) (by Arcand)
by leeto
static varible and function with <template>
 
I try to create small project in order to better understand how key word static works with templates . However some compiles errors crush my plan. Could you hel...
[1 reply] : Hi there, Not 100% sure about this, but I think this error: 1>c:\all... (by closed account o3hC5Di1)
Sql Developer Debug not work
 
I am using oracle10g and i am using sql developer as client , I want to debug my procedure and I am using the run menu but it produce the following error pls he...
[1 reply] : Hi there, This would better be asked on a forum related to oracle, bu... (by closed account o3hC5Di1)
July 2012 Pages: 1... 2021222324... 54
  Archived months: [jun2012] [aug2012]

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