Beginners - February 2015 (Page 35)

simon says
 
#include <iostream> #include <time.h> #include <string> #include <Windows.h> using namespace std; int main() { int color; int loop = 1; int x = 4; stri...
[3 replies] Last: #include <iostream> #include <time.h> #include <string> #include <win... (by DyavolskiMost)
Need help for a program that scores a blackjack hand
 
My assignment is to write a program that scores a blackjack hand. all the cards from 2-9 are scored as 2-9 points, while 10,j,q,k, are 10 points, and ace has 1 ...
[no replies]
Need help with a main function.
 
I'm just trying to test my code to see if it works. The point is to enter an array of numbers and get the average out of all of them. I think the function is fi...
[4 replies] Last: I did copy/paste the main method, but it was from previous my previous... (by CNerd2121)
How to uppercase selective letters
 
How do I capitalize the last letter of the last name and first letter of the first name? I have to have a name that has a name that is in alphabetical order "ab...
[6 replies] Last: I'm required to do it in this format yes. However I found how to enter... (by TieRein)
Replacing four-letter words with "love"
 
Hello. I get "Microsoft Visual C++ Runtime Library" error while trying to debug this code with Visual Studio 2013. It happens only if the last symbol is punctua...
[2 replies] Last: I think you should start with checking if the word you enter is a fou... (by mighty asker)
Loop in a selection problem. (1,2)
 
Most of my questions are answered by quick Google searches, barring this one. The compiler gives an error whenever I try to compile this code (ignore the indent...
[23 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <s... (by Manga)
This pointer
 
Any one plz tell me, what is the practical use of "this" pointer ? Thanks.
[3 replies] Last: 'this' is a pointer to the object whose function has been invoked.A ne... (by C Pranav)
runtime binding inheritence
 
class Base { public: virtual int f() const { cout << "Base::f()\n"; return 1; } virtual void f(string) const {} virtual void g() const {} }; cla...
[3 replies] Last: No, f() does not override f(int) because they are two completely d... (by LB)
can anybody help me? im new at this
 
Write an application that prompts the user for six integers and: 1) 1) Determines and prints the largest and the smallest integer in the group 2) ...
[5 replies] Last: public class Array { public static void main(String args) { ... (by menazedvine)
How do you fill an array with numbers?
 
I'm very new to C++ and programming in general. I'm trying to write a program to convert roman numerals to decimals and am stuck on filling an array with number...
[2 replies] Last: Figured it out... I was printing the address of the array, not what wa... (by jeanniezucchini)
Using Switch to Convert Char to Int
 
Hello All, I am trying to convert a series of letters in char(not string) to numbers. I have setup the switch case but it doesnt seems to work. If someone can ...
[7 replies] Last: If you want p, t, c, and d to map to 0, 1, 2, and 3 then just use a c-... (by dhayden)
Header Files
 
Hi guys.I have a problem about header files.I am working with big c++ book. I don't understand where ccc_empl.h is or how do i add this file to my project. I ...
[3 replies] Last: Thank you very much for your answers..I add cc_empl.h file to my proje... (by earthquake)
by LloydR
Technical words and meanings
 
Hello everybody. So as I am learning C++, I come across a lot of technical terms. I've written them down so I will add them here: Instance Object Par...
[1 reply] : Google Wikipedia This site? (by tipaye)
const in global
 
im doing my friend's project. and they should run it to dev c++ dev c++ complaint about initializing the variable in class. is it alright to put the constant...
[6 replies] Last: @anup30 thanks. but i already finish my friends project im back now to... (by xenovia12)
by Ulutay
vector<struct>
 
Hello i have made this struct and want to create a vector of its type. struct Dog{ string name; string type; int age; string color; //... }; vect...
[3 replies] Last: Why are you trying x .name when you clearly named your vector of dogs... (by Ulutay)
operator overloading
 
Plz any one tell me, what is "(size_t size)" mean in "new" operator overloading? thanks. void *operator new (size_t size)
[6 replies] Last: Just FYI: new int does not just call operator new . It calculates s... (by MiiNiPaa)
by LloydR
need Help with saving a variable
 
Hello I am currently learning programming. I am still at the beginners level, but I am having a problem trying to figure this out. I created a basic calcula...
[7 replies] Last: Hello and apologies for the late reply! I had a power cut, so I was no... (by LloydR)
Date Class Questions
 
Hello! I'm doing a bit of homework working with classes. The goal is to create a Date class that store a calendar date. I'm having a bit of trouble writing...
[1 reply] : should this be entered as a string? No, it's ok that way. do I pass... (by coder777)
Program for Finding Median of 5 Numbers
 
Hello, I was wondering how to make it so that my code can handle 5 numbers instead of 3. I would like a hint but nothing overboard. I can't use arrays or loops,...
[15 replies] Last: Yeah I tried the nested "if else" statements and it was crazy hard to ... (by closed account NU9yT05o)
Class function not updating variable
 
I am looking for a hint to where my program is failing. The program uses a default constructor to set the values null and an overloaded constructor to initializ...
[7 replies] Last: So here were the corrections I made, I think I followed the advise but... (by sulliaa8)
February 2015 Pages: 1... 3334353637... 52
  Archived months: [jan2015] [mar2015]

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