Beginners - October 2012 (Page 3)

by veeyik
find the common prefix of two strings
 
I need to write a program to find the common prefix of two strings. for example. Enter string 1: I love you. Enter string 2: I love myself; The common prefi...
[11 replies] Last: YES thank you ! =) (by veeyik)
how can i call a multidimensional array reference in a function...i have this code and i get the error...
 
cannot convert char* to char (*) for argument 1 'void proximity (char (*) )' i get the jist but somethings wrong heres my code with bits cut ouut. oi...
[13 replies] Last: great i wondered when i would get to use const...remininds me i have n... (by devonrevenge)
float and double
 
what are the valid values of float and double? I understood that integer can have numbers from 0 to 65536. but didn't understand the limitations of the float an...
[3 replies] Last: Or C++: std::numeric_limits<> http://en.cppreference.com/w/cpp/type... (by JLBorges)
advice with simple program for my girlfriend
 
I just started learning how to program earlier this semester. We started with Karel (easy I know :D ) and now we moved on to C++. I decided to try and make a sm...
[5 replies] Last: Something like this: string animal; cout << "What is your fa... (by Chervil)
by veeyik
Display first 100 palindromic prime numbers
 
i am doing a question that asked to code a program to display FIRST 100 palindromic number. i already have the function isPrime and isPalindrome. but i dont k...
[7 replies] Last: Yes it is correct thank you =) (by veeyik)
friend function..// How to display on of the function Depoiste/Withdraw.
 
#include<iostream> #include<conio.h> using namespace std; //Class Bank class bank { private: char name_of_depositor ; long account_number; char type...
[1 reply] : Post your code in "<>" (code) tag. Its easy to read that way (by codewalker)
by Meden
what is wrong with my code?
 
Hi. I am just starting to learn C++ just as a hobby. I am working on a very basic program right now. I am wondering if anyone would tell me what is wrong wit...
[4 replies] Last: It may help to look at the code from another angle: This code uses an ... (by Chervil)
Failed to create a new dir using boost::filesystem
 
Hi Everyone, I am not able to create a new directory using boost::filesystem - please find below my code and request your help to resolve this issue. #inc...
[no replies]
friend functions
 
#include<iostream.h> #include<conio.h> class complex { int r; public: void input(int a) {r=a;} voi...
[2 replies] Last: oh yea..thnx (by vgoel38)
Template in class
 
Here the work i done so far #include <iostream> #include <string> using namespace std; template< class T > class Employee{ private: T EmployeeID , ...
[10 replies] Last: mind a senior teach me ? (by BasicNewbie)
Transfering values between functions
 
How do I maintain my values input into the “getinput “ function in my main function? What I’m trying to do is call the function, have those instructions r...
[3 replies] Last: Thanks for the quick replys! @ Useless (12) Your solution worked... (by JRimmer)
by smrt
Creating a vector of string pointers?
 
Hello again. My assignment is to create a program that reads a text file and displays a list of the top ten most common words in it. To do this, I read the ...
[5 replies] Last: On line 7, you would need to the address-of operator. You can't simply... (by Zhuge)
inFile.ignore help?
 
So I'm working on a project where we input a txt file and create an output for it. My problem is that we are supposed to skip the first line in the file because...
[14 replies] Last: So you checked and there is no whitespace or anything on a line after ... (by Zhuge)
by nahla
Problem with code, how to fix?
 
I am trying to set ls-os to never equal zero. But I have some errors: #include <iostream> #include <math.h> using namespace std; // Precondition: Last ...
[2 replies] Last: When you see a line of compiler errors, look at the line number of the... (by barrelroll)
Doing something on push of key.
 
I need a way for the user to be able to push a button to cause something. #include <iostream> using namespace std; int main() { cout << "Welcome" <<...
[1 reply] : There are two ways to do this. The first requires you to push "enter,... (by BrentSpinor)
by kske
Quadratic Equation using Structures
 
Create a structure named quad that has three data numbers of the type double for the a, b, and c coefficients of a quadratic polynomial: f(x) = ax^2 + bx + c W...
[5 replies] Last: I don't have a compiler or program to run it on my laptop so I have no... (by kske)
by kske
3 way duel problem
 
Adam, Bob, and Charlie agreed on a duel to the death (using paintball guns). Adam was a poor shot and only hit his target with a probability of 1/3. Bob hit his...
[5 replies] Last: ok thank you! (by kske)
who wants $25?
 
I will pay $25 on PAYPAL to person who can do my homework. Sorry I am too buys with job chrismas coming I dont have time to do it. If you dont do it please dont...
[9 replies] Last: For the purposes of this assignment there is no difference - in either... (by LB)
by jlk563
Undefined reference error
 
Hello. I am working on an assignment in which a program takes in a passage through standard input, stores each word in a binary tree and counts the words freque...
[5 replies] Last: Hmm...You're right. Can't believe I overlooked that. Works now, thank ... (by jlk563)
C-String help
 
Hello everyone. I am currently writing a program for class and I was having some trouble. Please note I am not on here for someone to do my homework I am here t...
[2 replies] Last: I am rewriting this but when I input (strPtr != null) it underlines nu... (by andrew73a)
October 2012 Pages: 12345... 84
  Archived months: [sep2012] [nov2012]

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