Beginners - February 2011 (Page 32)

Error Checking -
 
Hi, I have a quick question about error checking. If I wish to check the parameters passed to a function, should I do this before calling the function, withi...
[2 replies] Last: Hi Zhuge, Yeah, getting tired of writing duplicate error code is wh... (by freakalien)
by wood
Noob's question - please heeelp asap!
 
Hi.. I have the following code which should read a matrix and then type its content.. But when I run it, it only types the last column! Whats going on? Pleas...
[3 replies] Last: No but I can give you references: http://cplusplus.com/reference/st... (by ultifinitus)
Saving and Loading from a text file
 
I was using the example code that is on this site: // print the content of a text file. #include <iostream> #include <fstream> using namespace std; int ...
[2 replies] Last: I was just working on the code and I worked it out with a bit more res... (by tehrealbinglebob)
Undefined Symbol 'String'
 
Using Turbo C++ 4.5, I get the following error when compiling this code: #include <iostream.h> #include <string.h> int main() { String Name; cout<...
[6 replies] Last: However it closes right away after execution There's a sticky on ... (by Disch)
Regular Expressions Searching doesn't work!
 
I am having trouble using regular expressions. I use Eclipse IDE, gcc compiler, and run Ubuntu. Every time I try to use a regular expression, Eclipse throws up ...
[3 replies] Last: using namespace boost; BTW, I don't know how exactly you are linkin... (by Duthomhas)
Program bug (Tip/Gratuity Calculator)
 
Hi, I 98% finished this program that is suppose to calculate the gratuity from a bill. The only problem I'm having is the do-while loop. On the first run of the...
[3 replies] Last: Well I fixed the problem by changing the program a little. I removed t... (by SFX9901)
Void Function Blues...
 
I am making a simple calculator, and I can't get this function to work. (Please disregard my stupid sentences) Here it is: #include <iostream> ...
[5 replies] Last: That's solved it now! Thanks a lot, y'all. :D Although @morecm I th... (by TentPegSlayer)
Inheritance Initialization Question
 
Hi, I'm starting to get the hang of this inheritance thing, but I'm completely thrown off by the order of which initialization events take place. I'm wonderin...
[5 replies] Last: Base classes have to be initialized first. The theory is that the der... (by jsmith)
patient question
 
I can not seem to find the bugs in the code .. I know it's not over, but I have no nerves, so please help... #include <iostream> #include <exception> #inc...
[6 replies] Last: yes, i know, but in my assignment operator () must be implement like a... (by hakspek)
books and compilers
 
hi guys, trying to learn c++ but finding it very difficult to match a book with a compiler. i tried using for dummies on dev+ kit but had a lot of errors......
[2 replies] Last: If you mean Dev C++, it's an old IDE, don't use it. You can downloa... (by filipe)
Calculator problems
 
I have been assiged to do a calculator project that : Prompt the user for numbers (floating point)   Prompt the user for functions (add, subtract, multip...
[2 replies] Last: It doesnt keep a running total and keep prompting the user until an eq... (by VvKevin80)
setprecision set larger than float sig digits
 
My instructor explained this to the class but no one could follow it and it is not in the textbook. Would someone please explain this in a manner that makes se...
[1 reply] : Floating point notation leads to precision loss. " double " actually ... (by Bazzy)
by tupaiz
break loop. (1,2)
 
for(int j=10;j<b;j--) { if(arry >a) { arry = arry[j+1]; } else if(arry <a) { a = arry[j+1]; break;// i want to break loop here. ...
[21 replies] Last: owh..OMG.guess that i'm little bit rusty after over 2 month without co... (by tupaiz)
How to give input file?
 
hey guys i wana know how to give an input file to a program? and get back an output file...? thanks
[4 replies] Last: Here's an example: std::string infilename; std::cin >> infilename; ... (by Browni3141)
Creating loop for functions-
 
Hello out there; Thank you for taking the time to help. I need to figure out how to create a loop for my functions. 1st needed to create a menu with choices ...
[2 replies] Last: Please format your code with tags . It will make your post more leg... (by Browni3141)
Question about using If/Else Statements.
 
I'm in a C++ class in the local community college, and one of the Lab Assignments tells us to make a program to compare a table of numbers. However, the meth...
[2 replies] Last: Well, how's this for meaningful naming? least mid_least hi_least ... (by DivinFalcon)
by vghz3
quadrant problem
 
I'm trying to have all the functions to show in their own quadrant when I input the numbers in. (Cartesian graph) Everything else is perfect except for the qua...
[3 replies] Last: after if {} (by Janlan)
passing constant to function
 
I know i'm probably missing something simple here, but i'm stummped. I can't see why i can't pass the constant " THE_WORD " to my function " testGuess " I ...
[5 replies] Last: I would recommend changing the font used by your IDE if you can, one t... (by closed account z05DSL3A)
vectors question
 
Hi all, I have a question. after learning vectors as I knew it acts like an array with improved function, so will I need to use arrays again or vectors are en...
[3 replies] Last: There are two kinds of arrays in C -- fixed-length arrays and variable... (by jsmith)
file problem
 
hi guys, I am trying to read to a text file and get some information and store it another file.The file is a log file so any ideas?
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ (by filipe)
February 2011 Pages: 1... 3031323334... 43
  Archived months: [jan2011] [mar2011]

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