Beginners - February 2012 (Page 39)

Using Functions and arrays
 
Driver's license exam has 20 multiple choice questions. I have the questions and answers. The program should store the correct answers in an array. Then it shou...
[1 reply] : Store users answers in array. When user has finished: set score to ... (by Moschops)
Read output of /proc/[pid]/status
 
This question is kind of a C question, rather than C++, but I figured this would still be an appropriate place to ask. I am trying to parse the output of the ...
[no replies]
by NYK
string problems
 
#include <iostream> #include <string> #include <strings.h>// just to make sure. using namespace std; void choicex(); void choicey(); int main() { ...
[8 replies] Last: // yes, I was not able to implement a sub-function that I had found: ... (by NYK)
Validate user input
 
Hi all, I am new to the forum. I am trying to validate user input to be between 1 to 100. Anything lower or higher will ask user to key in number again. It w...
[14 replies] Last: Chipp, because it is a C header. (by LB)
Cimg library
 
hi does anyone worked with cimg library? (http://cimg.sourceforge.net/index.shtml) if you did pleas tell me how to work with that library. when i write a pr...
[9 replies] Last: Download the whole package http://sourceforge.net/projects/cimg/file... (by Moschops)
Class problem
 
I was watching this tutorial: http://thenewboston.org/watch.php?cat=16&number=55 I understood it all until about 6:10 when it shown a line of code like this: E...
[2 replies] Last: Wow, that was fast! Thanks! (by Exispistis)
by atjm88
N=P?
 
Original program #include <iostream> #include <conio> int main() { int N, itemCnt=0; double price, totalPrice=0; cout<<"Program To Calculate The ...
[11 replies] Last: Thanks chipp for the library provided...it do help in Visual Studio 20... (by atjm88)
Why the 5 random characters?
 
Can anyone tell me why my output for this program looks like this: (The 5 characters underlined are the extra ones at the top.) 8 85 3 36123 5 85321...
[1 reply] : Lol. Thanks for all the help. I've figured out how to fix everything... (by ErinCorona)
by Lio
Ambigous constructor
 
I have problem with ambiguous constractor When I call the empty cosntractor ,I have an error call of overloaded thing() is ambiguous. Thanks #include <iost...
[1 reply] : You gave a default value to the double constructor, so two constructor... (by hamsterman)
vector!! push_back bug in c++ prog.
 
Hello there. Im working with a bank program in console c++. I have faced a problem i can't solve now. When im shuting down the program with my exit function, It...
[2 replies] Last: Yes thank you it worked :) (by It3rat0r)
array of derived classes problems
 
Hi, I'm trying to learn how to have an array of derived classes. The code below shows a simplified version of the problem I am experiencing. As you can s...
[4 replies] Last: Thanks Peter, that was just what I was looking for. Cheers (by mscashmore)
Can't get simple "write" function to work
 
Hello all, first post here having a bit of trouble figuring out what i am doing wrong. I'll start by saying what i have... I am creating an address book, ...
[2 replies] Last: You are not actually initializing the data members in the default cons... (by Peter87)
by atjm88
Why need this line before go into loop?
 
Hi, the following code from C++ book, but I don't know why need this line of code at line 11 and 12 cout<<"Enter price of item: "; cin>>price; and also w...
[11 replies] Last: Thanks for the explanation, I will try to look in details at the link ... (by atjm88)
string-array functions
 
Hey out there, I would like you to ask if you could use a string-array as return type. I'd think at something like this: string function () ...
[3 replies] Last: cool! thanks a lot you two. (by FlashDrive)
Why isn't my infile.get working?
 
My program is supposed to read in numbers from a file, one character at a time. When ran, the program correctly identifies that the first line only has one cha...
[5 replies] Last: For future reference (for myself, really) it wasn't working because my... (by ErinCorona)
by atjm88
Boolean Flag??
 
Hi, may I know how to implement the proceed as a Boolean flag? I not really know what is Boolean flag means, can anyone explain? Thanks... #include <iostr...
[2 replies] Last: Thanks yasar, means that if I enter "1", it will consider as "true" an... (by atjm88)
union of two strings A and B
 
I need to write the function which return the union of two strings in C++. public string union(string A, string B) { code } Could someone help m...
[9 replies] Last: @ne555, I'm hardly in any kind of position to enforce learning. (by hamsterman)
by atjm88
Failed to load image
 
Hi, I tried to run the following code in Visual Studio 2010 C++ but then it give an error: fatal error LNK1120: 6 unresolved externals May I know what happen...
[3 replies] Last: I need an advice from u guy too, now I'm doing the project related to ... (by atjm88)
How to concatenate macro definition and a string
 
Can I make something like this work? // consider that macro PARENT defined when compiling using preprocessor options string filepath = PARENT + "rest/o...
[4 replies] Last: Because I want it to be decided by configuration script. I have made c... (by yasar11732)
by atjm88
Borland C++ Tracing?
 
Hi, can the Borland C++ trace the code line by line? Is there any function like that? TQ...
[no replies]
February 2012 Pages: 1... 3738394041... 64
  Archived months: [jan2012] [mar2012]

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