General C++ Programming - April 2008 (Page 8)

here
 
#include <iostream> namespace std; double fallingDistance() const double = 32.2 int main () { double d, g, t; cout << "Giving the G and the T I w...
[5 replies] Last: I give...here's the code: #include <iostream> #include <cmath> c... (by closed account z05DSL3A)
by nezi
Problem in Inline functions
 
It is said that inline functions are used when our function has short code.My question is what is the meaning of short code.I mean how many lines of code is per...
[1 reply] : As far as I know, declaring a function as an inline function is ONLY A... (by msram)
by ehenze
Multiple file input...
 
From the command line, I want to execute the program with the directory of the files I plan to process as an arguement. C:\> catch c:\myfiles\ From within...
[3 replies] Last: Is this what you want? #include <dirent.h> #include <errno.h> ... (by msram)
help reviewing for my exam
 
hello all, this is my first post my roommate and I are stuck. heres the code. string get_data (const string &incoming) int p = incoming.find("<da...
[1 reply] : p is being used as an index to mark the begining of the <data> tag in ... (by closed account z05DSL3A)
by hazda
Pls help!!!!Brute force??
 
Brute Force???? Say for instance i have an array surface of and the base station for my car is situated at the centre . The car is able to move North,E...
[1 reply] : This is a C++ forum, you ask for an algorithm. EDIT: You shouldn't ... (by ropez)
Maximum Size of dynamic array
 
Hi I was wondering what the restrictions are on allocating a one dimensional (multidimensional) array like this: p=new double ; What determines the ma...
[4 replies] Last: > size_t is an unsigned int so basically this would mean n is somethin... (by ropez)
Converting the 'this' pointer
 
Hi, I need to store a 'this' pointer of an object to a string and restore it from the string later in the program flow. The first task is the easy one: s...
[6 replies] Last: Yea, This is good for a 32bit application. As for the returned addres... (by georgeplusplus)
by kiltux
help with basic decimal to binary converter
 
oke here is the problem. i have made a simple decimal to binary converter but the binary is standing in reverse order, how can i do it correct? #include <i...
[1 reply] : Hi, the algorithm you use for the conversion just gets the most sig... (by naja)
delimited string to vector
 
I'm reading in a line of a text file using realine. The string contains values delimited by a single quote ('). The number of values varies so I don't know how ...
[1 reply] : // Assume textLine contains the line of text to parse. string textLin... (by jsmith)
References in data structures
 
Im creating a data structure called button. Most of its elements are just old-fashioned data types, except the last one, which is supposed to be a reference to ...
[1 reply] : References must be initialized at instantiation time. To fix this, yo... (by jsmith)
what does this mean
 
getHighest and on getLowest: cannot convert parameter 1 from 'int ' to 'double '
[1 reply] : Well I searched MSDN for the getHighest/Lowest functions but it didn't... (by firedraco)
I/O
 
Before I guess too early, is default I/O the most effective way to handle read and write to files? I know it may seem like a dumb question, but I need to know....
[1 reply] : I believe so. You could try doing a search for file I/O and see if yo... (by firedraco)
by doom
Prime number program
 
So I accidentally posted this is the wrong forum. Anyway, I'll post it here again because the other one should be deleted. I need to write a program that get...
[6 replies] Last: The fastest method to check for primality discovered so far is the AKS... (by msram)
Hey how do I do this...
 
Round to 2 decimal places... Ill show you the code quick... #include<iostream> using namespace std; int main() { double barack = 0; ...
[2 replies] Last: If you want 2 decimal places you will need to set the precision to fou... (by closed account z05DSL3A)
Please Help with my program
 
I am getting the following error when run the code with the following destructor. ------ Build started: Project: Harris_CS3330_1.1, Configuration: Release ...
[no replies]
Please Help with my program
 
template<class T> Database<T>::~Database() { // Copy nonnull records to new file // Delete old data file // rename new file old filename fs...
[no replies]
Code Help!!!
 
#include<iostream> using namespace std; int main() { int n; int abort; cout << "Input the number you would like to star...
[3 replies] Last: Easy fix, you almost had it correct. Comments where I changed the cod... (by nogoodatall)
How can I create random text?
 
Greetings! I would like to learn how I can create random text output that is combined with user input. If it helps, think of the psuedo randomness of a ma...
[1 reply] : Maybe looking at switch-case structures would be helpful: http://ww... (by xabnu)
Help with Graphics
 
Hey, I'm sorta new to C++, and I'm learning it primarily to create a game (named T.I.L.T, incase anyone's wondering), however, to do that, I need to know how to...
[2 replies] Last: Regular graphics... Probably like .bmp and maybe some .gif. Can any... (by VenomousNinja)
I need help with my homework assignment
 
I am working on a program for my Data Structures and Algorithms in C++ class. Define function isNull () & writeNullToFile () in classes Personal and Student...
[1 reply] : I am fairly new to programming so I will not be offended if you expert... (by gieenet)
April 2008 Pages: 1... 67891011
  Archived months: [mar2008] [may2008]

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