Beginners - July 2012 (Page 13)

whats better to use?
 
http://pastebin.com/EJmXSeqi or http://pastebin.com/sq7meKvh im working on effeciency here and need to know which is better and more professional this is my fi...
[5 replies] Last: I'd go with the first one since I think it's easier to follow. (by TwoOfDiamonds)
cin buffer problem
 
Here is a simple program that I can't seem to get working. If you run the program, it works fine until the age question, where after I type in my age, the progr...
[2 replies] Last: when you press enter after entering the age,'\n' is saved in input buf... (by Akshit)
Trying to complete Net Pay Average
 
My error is at line 121. What am I doing wrong? I think it will work after I fix line 121 #include <iostream> #include<fstream>//file input output stream usin...
[2 replies] Last: line 121 remove int from the for loop. Move totalNetPay +=netpay ... (by bmiller)
link list array
 
#include <cstdlib> #include <iostream> #include <string> using namespace std; class Network { // private function to constructe the nodes with a lef...
[1 reply] : I might be wrong on this, but I believe in main, you're printing out t... (by Volatile Pulse)
by x1222
Destructor not called when using New?
 
int main(){ SomeClass* classPTR = new SomeClass ; SomeClass MyClass; return 0; } SomeClass:: ~SomeClass() { cout << "Destructor called"; } ...
[3 replies] Last: So when I use new , I have to manually delete it Sort of. If you u... (by Disch)
by Dns
How to find the number of the element inside an array?
 
I have 4 arrays, and all has same number of elements inside it. I want to get the number of the element in array1 to retrive the other elements in the other arr...
[4 replies] Last: You have to keep track of the size of the array yourself. If you're r... (by Lowest0ne)
What is a tilemap?
 
Ive seen the term a lot but i dont really know what it is.
[1 reply] : http://lmgtfy.com/?q=tilemap&l=1 That will help. Lol I read that wron... (by bmiller)
Linux Makefiles
 
I've been searching for days and reading about using makefiles on linux and I cannot, for the life of me, get it to work correctly. Let's say I have three file...
[4 replies] Last: Ahhh. Never knew that. Thanks again :) (by Captain Cosine)
Clarify this please?
 
I got no idea what does this suppose to mean. When I read the details on the book, I'm like O.O what... lol So here. if ( gradeCounter != 0 ) { avera...
[1 reply] : if gradeCounter is not equal to 0 then the variable total is caste... (by hacker804)
Need a sample
 
Ok, I need just a small example that defines a class that has public, private, and protected members. If I have a visual then I can better understand and write...
[3 replies] Last: class human { public: string askForName(); private: string name; ... (by stoffe1100)
"Newline in constant" error
 
I'm trying to declare a simple array with a long list so that later in my code I can identify the "badChar"s in my input, but every time I try to compile I get ...
[5 replies] Last: Oh! It's working now even though it was giving me errors about the bra... (by Dragonleopard88)
Keep If Statement going until right choice?
 
So i just wrote a program reimplemented in C++ that i originally wrote in VB.net. Only difference is that this in terminal while that VB.net project is gui. But...
[3 replies] Last: thanks i completely forgot about the switch i will rewrite it with tha... (by killertcell)
What's the point of doing "using std::cout;"?
 
I see examples with "using cout"? What's the point of this if you have to type it out on the code anyways? For example: #include <iostream> using std::cout; u...
[3 replies] Last: @DetectiveRawr can't you simply type "using namespace std;" to clear... (by vlad from moscow)
Help?
 
What does "for (int i=1; i<5; i++)" mean? I'm trying to make the user to print 5 integers and find large and small. Ignore the sum and product! #include <io...
[7 replies] Last: Well I learned about variables and now I"m at the control structure wh... (by DetectiveRawr)
by Kurisu
Hello World, three different ways? Which is best?
 
I'm currently teaching myself C++ through the use of online resources and books. And I have noticed something. Each of the resources teaches the "Hello World" ...
[3 replies] Last: I would say the third one is best! Welcome to c++. Pretty much everyt... (by stoffe1100)
I/O Manipulation
 
Is there a way to manipulate the output on the console screen so that a horizontal list is aligned neatly? For example: My output currently: XXXXXXXX____XXXX...
[7 replies] Last: Figured it out. Your code was right, I just needed to say if (++lin... (by scu1casper)
help me please
 
hi , how are you guys ? i hope you all fine here , iam trying to make program for adding new patient and edit description but i got some errors so i h...
[7 replies] Last: ohh yeah, you right thank you i fixed it thank you again for your he... (by thunderxlight)
by Drenax
Min/Max Problems
 
#include <iostream> using namespace std; int eaten , i; // declaring variables int main () { cout << "How many pancakes did the following perso...
[3 replies] Last: This is Turbo C++ code.Change this to VC++.Its 100% working. #includ... (by Akshit)
Looping with a string?
 
I'm trying to get a string and a number to write to a file number of times, which the user determines. But the loop only partially runs before closing. #inclu...
[2 replies] Last: works. Thank you! (by kichithewolf)
Trying to fix this D:!!!
 
I posted something about "what data type I should use for a decimal".... so I got some feedbacks about "float" and "double". I got some knowledge on these but o...
[4 replies] Last: lol Moschops. Thanks for the help. (by DetectiveRawr)
July 2012 Pages: 1... 1112131415... 54
  Archived months: [jun2012] [aug2012]

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