Beginners - September 2009 (Page 8)

Why is my calculator calculating wrong?
 
solved.
[2 replies] Last: thank you! i knew that you didnt have to put & when you were printing ... (by Ingenko)
3rd c++ assignment. Getting weird numbers.
 
Hi there, This is my 3rd assignment ever for C++ and I am having problems with it, I keep on getting some weird outputs for numbers. Here is the assignment, ...
[1 reply] : Nevermind, I figured it out. The problem was: AddFourNumbers(10,20,... (by RPinney)
by meesa
How to find out what cin.getline() returns?
 
Okay, so I have this line of code cin.getline(var.line1,50); The rest of the code doesn't matter. I know that getline() returns either eofbit, fail...
[9 replies] Last: You have to clear the stream (to reset the error bits) Thank you, u... (by meesa)
by Duncan
Bullet attacking an Enemy
 
Hi everyone. So I'm working on a Tower Defense game. If you're not familiar with Tower Defense, all that is necessary for you to know for this post is that Enem...
[4 replies] Last: you're right a std::deque would be more appropriate in this case. I CO... (by Duncan)
matrix of ABC
 
// ABC #include<io.h>//need for cin cout #include<conio.h>//need for getch #include"matrix.h"//need for plot int main() { matrix <int> CharMatri...
[no replies]
Seg fault: Likely pointer or Malloc issue.
 
The code reads from a file and outputs a 'maze' diagram. The seg fault occurs immediately (even a printf right after main doesn't come through). I receive war...
[3 replies] Last: @ kevinchkin: Error checking isn't the issue. I just removed it to ge... (by IamScaredOfTrees)
im Trying to print ABC spread out like on a graph
 
// ABC #include<iostream>//need for cin cout #include<conio.h>//need for getch using namespace std; void startup(); int main() { int x; int ...
[1 reply] : What? - Please use [c ode] tags - (by Bazzy)
Variable for Array Size??
 
Is it not kosher to declare an array the size of a variable? //bubble sort #include<iostream> using namespace std; int main() { int size, x; c...
[5 replies] Last: Thanks!! I tried using a pointer before posting, but not in the co... (by Triryche)
Open file
 
Please help me write code for this task: open a .txt file ( with more than 100 characters ). Then sort the FIRST 100 characters and show the result by standar...
[4 replies] Last: I did it. Thank for help (by Progesco)
array size using pointer notation??
 
Is there a way to declare the size of an array using pointer notation without the square brackets that I used here? const int SIZE = 100; int myarray ; ...
[3 replies] Last: If you don't want to use the square brackets you can use the C dynamic... (by Bazzy)
dynamic struct definition
 
Hey there, I'm wondering if there is something like "dynamic struct definition". I mean: you give the user the opportunity to make his own struct members and...
[2 replies] Last: Ok, I was just trying to make my own database-program: at the top of t... (by nicolasfranck)
by motd
the use of fstream
 
I wanna know what is the differences between ofstream and ifstream and when i must use them ???? and how can i use them (Every thing please with paramete...
[2 replies] Last: Thankssssssssss i am so grateful..... (by motd)
Standard Deviation of 4 numbers.
 
Note - This is homework. Make a program that computes/outputs the mean and standard deviation of a set of four integers that are input by the user. The prob...
[4 replies] Last: Alright, you you VERY much ROmai. I'll start working it out, and I'll... (by SeeSayLeki)
by ratman
Array input from file
 
I cant seem to get the input from the file into the array to work correctly. When I remove the file input portion and initialize the arrays in the code it works...
[7 replies] Last: Also, this is wrong: for(int i = 19; i >=0; i--) { answer ... (by jsmith)
by agnea
Class problem: multiple definition of
 
Hi there!, I have created a simple project with this header file //Book.h #ifndef BOOK_H_ #define BOOK_H_ #include <string> using std::string; c...
[5 replies] Last: Right was my mistake......thank you for be so patient!! (by agnea)
passing pointers to methods
 
Hi all. I have a linked list of items, and a class which stores a pointer to one item of the list (the focused element). a method returns this pointer: ...
[1 reply] : Guess I could use a set method for the focus which takes a pointer. ... (by alexatcpp)
Programs
 
Hey again any of you guys know any good beginner programs not to give me the code for just names or ideas of ones I should try to research and learn I dont want...
[1 reply] : Blitz Coder has some good exercises for beginners here --> http://ww... (by bluezor)
plot letters on x.y graph
 
looks like A B C
[5 replies] Last: *sigh What do you not understand? int x; int y; int array ... (by DrChill)
by Rhys
Generic container and constructor/destructor
 
If I have a template class as follows: template<class T> class Stack_Template { T* v; int top; int max_size; public: // Exception/error handli...
[11 replies] Last: Not really much. Typically you'll want to customize the error strin... (by jsmith)
by motd
fstream hard to understand & read function
 
Salutations : I have searched in this great site about fstream library but the explain was too complex (I can not understand using ios::app and other para...
[6 replies] Last: I've attempted to improve the code. I've detailed the changes below. ... (by Chewbob)
September 2009 Pages: 1... 678910... 23
  Archived months: [aug2009] [oct2009]

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