Beginners - December 2011 (Page 36)

Why isn't the file opening?
 
#include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; fstream technologic ("daftpunk.bin", ios:...
[9 replies] Last: I can see no problem with the original code; fstream can be used with... (by andywestken)
by Luftey
Dynamic Memory Allocation
 
Essentially, I have an assignment where we were given a data file of ~140 values, and I must sort them into an array and then do some math with them. The guidel...
[2 replies] Last: value = value_from_file (by ausairman)
Problems programming lists
 
Still slowly learning c++ and im trying to write code that displays a mock parking lot. When the user arrives he/she is asked whether they are picking up or dro...
[4 replies] Last: :) (by Caprico)
how to make multiple function
 
hello,i just started computer programming in college,and everything was pretty smooth till functions and arrays were introduced to us, and from that moment i wa...
[3 replies] Last: You can learn about user-defined functions in the Documentation sectio... (by benjamin d)
which method to declare this array?
 
const int MATRIX=10; char noMatrix ={"BC0123","BC1234","BC2345","BC3456","BC4567","BC5678","BC6789","BC7890","BC8900","BC9999"}; OR char MATRIX =...
[no replies]
by Thamir
how to use sound effect in ur program ?
 
I will be grateful if someone help me . How can I insert some sound effect in my C program for for Example: If(x > 10 ) worning sound ; something li...
[3 replies] Last: eh, you could just beep at different intervals with different frequenc... (by IWishIKnew)
Creating logic during runtime
 
Can someone give me some direction on this problem. I have a text file with a format something like: input: in1, in2, in3; output: out1, out2; ...
[no replies]
by easo
C++ Array,Pointer,Dynamic
 
Hi, I am working on a project that requires a dynamic array and I am not sure how to create this array. I have created the whole project skeleton and works oka...
[4 replies] Last: Can you guide me how to do that? Do you have a specific question? ... (by Catfish)
help in classes -
 
i dont understand the error codes here if someone can help #include <iostream>; #include <cmath>; using namespace std; class rational { private: ...
[2 replies] Last: ok dumb question what is a return type? (by seawolfmoose)
Operator overloading ??
 
Hi :-) I am just trying to figure out what the practical use of operator overloading is.... I came across a description of the syntax for operator overloading,...
[8 replies] Last: Ok. If I am not mistaken, the code I provided works like this. In ... (by bonebreaker)
trying to display rates
 
Hi, thanks for the help before. My problem now is the final part where it is supposed to display the rates of month, day and week that was declared above, but ...
[no replies]
Set
 
how can i make a Two-dimensional set? for example : {{1,2,3} ,{1,2,4}}
[1 reply] : You can have a set of sets... #include <set> std::set<std::set<int... (by Catfish)
by zed55
I can compile this program but it doesn't run.
 
// Project # 2 #include<iostream> #include<math.h> using namespace std; int main() { // Defin Variables float N,L,TotalCost,P ,FastWorkers; float Ho...
[6 replies] Last: When you change int row; to int row=0; as Sc2slash told you to, it bui... (by zed55)
Beginner's troubles
 
Hi, I'm new to this forum and C++... I created this thread to post problems if I have one and I hope you will help me... Exercise: Write a class member th...
[12 replies] Last: Here's a function I wrote for this, because I always hated trying to r... (by Lynx876)
How do I check if a binary file is empty?
 
How do I check if a binary file is empty? i tried searching for it but nothing came up of use.
[5 replies] Last: There must be an error on my part somewhere. The help is very much app... (by Declan Murphy)
by moot1
calculator loop
 
whats wrong with this?? #include <iostream> #include <cstdlib> using namespace std; int main() { int operation; int howmany; int num;...
[7 replies] Last: You probably want to input numbers with std::cin inside the loop. (by Peter87)
trouble grasping constructing and overall use of class
 
having trouble with the concepts of writing constructors and objects. here is my code, very basic but there are red lines beneath the word after the :: if...
[6 replies] Last: i got it, turns out the() was needed. thanks! (by maharris)
Dynamic Arrays and Functions
 
I'm having a simple problems. I have the function void testFunction( int * blabla ) { blabla = new int ; blabla = 1; blabla = 4; blabla = 77; in...
[4 replies] Last: int*& is a reference to a pointer. int&* is a pointer to a referen... (by Peter87)
Using a pair as a key for a map -- can't find the right method ANYWHERE
 
I'm using namespace std; and I declare the following: map<pair<double,int>, double> mymap; and I insert values into my map like so: mymap[make_pair(x,y)] = s...
[11 replies] Last: Not quite. As I said above, operator always returns a value, whateve... (by andywestken)
by KS05
Need Help Random Number Guess Game!
 
Hello, I am having trouble with my random number guess game that I need to create for a class I am taking. It is suppose to prompt the user if they want to pla...
[4 replies] Last: lol, you're welcome. I've sat here looking at my screen for hours tryi... (by Lynx876)
December 2011 Pages: 1... 3435363738... 47
  Archived months: [nov2011] [jan2012]

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