Beginners - October 2014 (Page 4)

Assistance with homework
 
I need assistance with a problem. I have completed the C++ coding, however the formula I used is not giving me the correct answers. I need to write a C++ progra...
[3 replies] Last: Thanks everyone for your assistance, I greatly appreciate it. (by Scofield16)
by Alphar
if A is equal to B ,print"Yes",or print "No" (1,2)
 
Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should print "YES", or print "NO". Sample Input 1 2 2 2 3...
[20 replies] Last: You have a number of alternative pieces of advice and you need to use... (by Alphar)
please help////
 
hey guys i have a question about recursion. ive been trying to learn it for a while now and i got stuck in this codes i dont understand why when i run t...
[3 replies] Last: oh but how does it prints out the numbers ?, recur... (by theposibility)
by c p p
array of objects
 
How would you make an array of a class data type where the class does not have a default constructor, and you need to pass in data? Thanks. Example: ...
[4 replies] Last: Not sure, but apparently C++14 makes it easier: http://stackoverflow.c... (by keskiverto)
Can someone give me any good implemented code of C++ Biginteger for programming contest?
 
I need C++ biginteger code to solve competitive programming problems. Can anyone provide me please?
[3 replies] Last: Can it be used in ACM ICPC? You're the one in the contest so you sh... (by Z e r e o)
random help
 
Hey everyone, I'm writing a program for my assignment, and I wish to try out randomizing. I've one random test done a simple true false and its works well. M...
[2 replies] Last: hi keskiverto thank you for the quick reply ill work on the advice yo... (by mochate)
Monty Hall Problem with Functions
 
Hello. So, I have to write a program using user defined functions that solves the Monty Hall problem. For what I did, the counts for user winning and game winni...
[11 replies] Last: THANK YOU! THANK YOU BOTH! haha, I am an idiot. Well, you know what th... (by Vaan Everick)
Determining if a string is a valid time spec
 
Hello, I am relatively new to c++ and I am trying to make a program that converts time specs in the form of n1y n2n n3d n4h n5m n6s to seconds. One of the fu...
[4 replies] Last: You also may want to look closely at lines 2 to 5 in the above code. Y... (by jlb)
linked lists
 
hi guys,The code for an unordered list is able to operate on lists of any type. does anybody know the name of this mechanism?
[no replies]
by nomnum
Creating and outputting string arrays
 
Hey everyone. I am making a console RPG game. I am trying to set-up a very basic inventory system, where there would be an array full of strings that encomp...
[5 replies] Last: Just wanted to chime in a bit because you will see a lot on this forum... (by Z e r e o)
First Project Help
 
Hello, I am brand new to C++. I'm making a basic little text-based adventure thing as one of my first projects, and I don't know how to make different answers t...
[2 replies] Last: Maybe something like this, maybe use a loop if it's a no / NO. #incl... (by srscode)
Constructor Cannot Read Data
 
I created a main, and a constructor that looks like Main: #include "Book.h" #include <iostream> #include <string> using namespace std; int main() { Boo...
[9 replies] Last: Int main(), rather than creating the book using Book(a, b); try usi... (by Esslercuffi)
find the sum of subset
 
for(int i=0;i<x;i++) { long long int sum=0; for(int j=0;j<n;j++) { if(i&(1<<j)) ...
[no replies]
Swapping addresses
 
I am trying to swap the address of two variables from the main function. But address is only swapped inside the function and it does not affect the same variabl...
[4 replies] Last: Really Disch? Wow! (by closed account 48T7M4Gy)
Function of Dice simulation
 
Hello there folks. I am here to request help. Please don't misunderstand me. I don't want anyone to write me some code for free while I just sit here being lazy...
[3 replies] Last: If d =12893, then 12893/5000 = 2. Print two *s. Hope this helps. (by Duthomhas)
by sbas10
if (!cin) ?
 
I was looking at this code and wanted to what is the reason for lines 35 - 39: " if(!cin) { cin.clear(); cin.ignore...
[3 replies] Last: Makes sense now. Thanks y'all! (by sbas10)
String input 'overflowing' into next string variable
 
This is a total noob question but here goes: I'm trying to write a simple console program that just displays the limitations of using cin instead of getline()....
[4 replies] Last: @Jezze Thank you very much. This fixed it! I have no idea how it works... (by thatrandomsam95)
by rcson
A little help with a simple task
 
Hello, My task is to write a program that concatenates the last characters of three input strings. This is my code, but my program is not compiling and I don`t...
[13 replies] Last: Ok, my new code and it`s working fine, but with using substr #incl... (by rcson)
How to make program more effective
 
One of my homeworks required me to create 30 random numbers from 0 - 9 and count how many times each number appeared. I made a long if-else statement to chec...
[5 replies] Last: Ah I see, that makes it very clear thank you. I need to show which nu... (by alex067)
October 2014 Pages: 123456... 70
  Archived months: [sep2014] [nov2014]

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