Beginners - November 2009 (Page 22)

Need advice with I/O Streams and Data Files
 
Well we're on I/O streams dealing with reading and writing to a data file in my C++ class and im completely lost. I just got over having swine flu and I'm pret...
[6 replies] Last: Yes, what you have done here is 1.) You open the file. 2.) You as... (by nemesiscplusplus)
Parse the hex digits of int?
 
Hi all, Any idea how to do the following in c++ An integer is entered ie (1320) int mynum = 1320; char highbyte; char lowbyte; What I need t...
[1 reply] : You can get the last byte with mynum & 0xFF , the other one with ( ... (by Bazzy)
by JRevor
Weird syntax error
 
My lecturer wrote this code class IOBuffer { public: virtual TPointer Read(fstream& fs) = 0; }; Error `Read' declared as a `virtual' field. ...
[6 replies] Last: EDIT :(the message this was an answer to was deleted) This is w... (by JRevor)
having trouble with arrays
 
Im trying to wirte 5 functions GETDATA: that reads in the two dimensional array; average high that calulates and returns the average high temp; the average low...
[1 reply] : Please use [co de] tags. You are not specifying the return types ... (by Bazzy)
sorting method
 
how much sorting method in c++??(5 is enough) and give the explanation please..help!
[10 replies] Last: It's a sort in place algorithm to take a heap (as an array) and turn i... (by firedraco)
counting to the '\0' on the array of char
 
Hi I'm just about pulling my hair.. I can seem to figure out how to count to the end of the word, in an array of char see below, the code.. take a look at t...
[4 replies] Last: There are a number of ways to do this. you are making it way too comp... (by kempofighter)
references
 
I just got a bit confused at our last reading, i thought i understand references just fine but apparently I don't. I always thought this: int a=5; int &b...
[2 replies] Last: ahaa.. wow, thanks a lot (by stupid idiot)
Circle
 
#include <iostream> #include <iomanip> #include <cmath> using namespace std; const float PI = 3.1416; //Prototypes declaration double distanc...
[3 replies] Last: cout << circumference (radius); radius is a function, pass it with a... (by Bazzy)
Array Problems
 
Hello everyone! I am a C++ beginner(I am familiar with Database but not C++) I have been learning C++ for two months....(Yes, I am a student) First, I am no...
[2 replies] Last: standard for loop for single dimensional arrays, and imbeded for loop ... (by gcampton)
How can I avoid using 'GoTo'???
 
//Author: Brandon Jackson //Program Operation: To find Area and Perimeter #include <iostream> using namespace std; int main()...
[2 replies] Last: oooo who used to program on commodore64 (me2) :D you may want to ... (by gcampton)
if Loops
 
I'd like some help please. I'm trying to find the maximum and minimum value in an array. The looping, and the random allocation of values to the array works, bu...
[3 replies] Last: what bazzy said ^^, looks fine to me except you have the order of assi... (by gcampton)
Distance Formula Not Homework
 
I'm not a C++ student, I'm self taught 14, and I wanted to make a program to solve my Geometry :p, like you've never tried. So help soon would be greatly app...
[5 replies] Last: To answer your actual problem, you're not calling any of the other fun... (by demosthenes2k8)
by mcb413
Void functions
 
Hi, guys. I hope you can help me. I just do not get what is wrong with my dev c++ program using namespace std; #include<iostream> #include<fstream> #include...
[5 replies] Last: Haha, i think he got the answer and forgot to give thanks to someone i... (by nemesiscplusplus)
Having problems with gradeCalculator
 
im trying to make a gradeCalculator that takes in inputs through a function, multiplies the grades by a constant value for their weighted % and calculate the fi...
[5 replies] Last: The only errors I am getting is that it's saying 'programRatio' is un... (by nemesiscplusplus)
How to Make a Palindrome?
 
Hello guyz, can someone teach me how to make a palindrome? I am thinking that first i should store it in my array, then we should get the length of a string. ...
[8 replies] Last: So here it is.. Just found out your error.. You must change your st... (by nemesiscplusplus)
multiset failed
 
The following code is cropped from my project. please help me to find why the multiset fail to find the match. The element (51,142) is supposed to be matched wi...
[1 reply] : http://www.sgi.com/tech/stl/StrictWeakOrdering.html "if a is less t... (by PanGalactic)
I cant understand this...
 
Good day! Im a C++ beginner, can anybody explain to me how this 2 codes work? #define _RGB16BIT565(r,g,b) ((b%32) + ((g%64) << 6) + ((r%32) << 11)) #de...
[5 replies] Last: Thank you guys! (by thetransltr)
Who knows SDL?
 
I am using SDL on a Linux machine and I keep seg faulting :( the program is supposed to blit a image to the screen and check the x & y coordinates when a use...
[1 reply] : Line 94: Assignment in conditional. Line 151: Superfluous check. (by helios)
Having Issues with Initializing Char
 
I'm making a program and at the very start it prompts the user to choose to know the answer to one of three options. cout << "This computer program calc...
[1 reply] : while (input != diameter || input != circumference || input != area) ... (by Bazzy)
Adding To Game
 
Hello, I posted a while ago to get some help with a simple game that I was creating to test what I had learned. I decided to rewrite the code to add new things ...
[13 replies] Last: You have the same errors I corrected you on the first post. You shoul... (by Bazzy)
November 2009 Pages: 1... 202122232425
  Archived months: [oct2009] [dec2009]

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