Beginners - June 2015 (Page 8)

by Pierce
Why will this not work? Bad use of IF function?
 
Hi guys, I have just finishing writing a program that simulates the casino game 'Three Card Poker'. I did it by creating an array of objects (my playing ...
[6 replies] Last: = doesn't compare the operands. It sets the variable on the left to th... (by helios)
by madara
store binary of decimal in char array
 
i want to store binary equivalent of decimal number in char array by applying below code, but the problem is i'm not able to hold the last bit of the decimal nu...
[7 replies] Last: Yes. Integer 0 and chracter '0' are different. integer 0 is used to de... (by MiiNiPaa)
by ertix
Trouble with strcat and text file input
 
I'm having trouble making sense of what is happening to my text file input. The goal of the assignment is to take a text file of names, and reformat the order i...
[2 replies] Last: I would love to use std::string. Unfortunately, this is an assignment ... (by ertix)
write to a file
 
I am trying to write to a file , but the file is not even created. The program compiles fine and runs without any exception. At the end, there is not file cr...
[2 replies] Last: The issue is solved. Provided wrong file path . Thanks (by sajis997)
Input Validation with Ints and Doubles
 
So i am trying to have the user only receive integers when they are choosing an array size but the numbers don't add up if I were to to type in a floating numbe...
[2 replies] Last: Input as a string and validate the string #include <iostream> #inclu... (by Yanson)
PLEASE HELP
 
hey guys please help me :( the code is not working here's the question Construct a class named Light that simulates a traffic light. The class color attribu...
[3 replies] Last: It is late. Hopefully this helps it is my take your problem. Hopefully... (by Bdanielz)
by Isho
Creating a simple table
 
Hello everyone. I am new to C++ and learning it for the first time with the help of some free C++ tutorial videos from Udemy. I have been trying to create a s...
[1 reply] : Somethig like that: #include <iostream> #include <iomanip> int main(... (by MiiNiPaa)
String Variable?
 
Write a program that will ask for personal details of a student for his bio-data. Ask for his nickname, age, mobile number, course, year level, and 3 sports ac...
[3 replies] Last: Your not making any sense. You declared nickname, you just asked how ... (by SamuelAdams)
by ph0703
Question about Arrays
 
I am working an assignment for my C++ class. I am trying to write a program with arrays but when I print the array out I am receiving numbers like -4.8e-299 and...
[13 replies] Last: Glad you figured it out. (by admkrk)
OOP TicTacToe Critique
 
Hey there programmers, I have written a oop version of Tic Tac Toe. If you could critique my code and let me know if there is a more efficient and better way of...
[8 replies] Last: WoW thanks for the replies guys, a lot of good information here for me... (by CpluspProgrammer)
Problem compiling Phonebook app LNK2019 error
 
Hey guys, title says it all pretty much. I'm having problems compiling my phonebook application. I get the two errors: Error 1 error LNK2019: unresolved externa...
[2 replies] Last: damn... thanks lol (by CpluspProgrammer)
Deck of Cards Class
 
I worked this up today to use for creating card games. I thought I would share it so the greater audience could tear it apart and offer suggestions for improve...
[1 reply] : In case anyone was wondering why I would make the 'card' structure usi... (by HellfireXP)
Disposing Thread
 
Hi All, I am new to c++.How to dispose the thread?.Please any one give an idea.
[1 reply] : You could call std::terminate() from any thread and the thread you're... (by TheToaster)
Seemingly Correct Program Crashing!
 
Hi! I tried to write a program that outputs all numbers from 1 to 1000 that have prime factors which add up to a prime number (it's an exercise in the book J...
[2 replies] Last: The program runs now, thanks so much! Always the little errors... (by bedroomCoder)
Repeating a menu option until user quits
 
I'm having a bunch of issues with this program. Right now I am working on the Addition portion so hopefully it will transfer over to the other menu options. So...
[7 replies] Last: @dhayden, Neat readable clean code solution. I like it. (by CodeWriter)
Strings
 
Can anyone explain me what does this code string str = "";
[6 replies] Last: @dhayden: Yes, I know. My bad for not being thorough-enough. (by koothkeeper)
Directives and Declarations
 
I am not understanding the very first program example in every book. My original question was "Why are we not using #include for every instance when we want to ...
[5 replies] Last: I am failing to understand why two pieces of reusable code They are ... (by MiiNiPaa)
About dynamic allocation...
 
I need your help. Observe the following class- class panda { int a; public: panda(int x) { a = x; } friend ostream& operator<<(o...
[4 replies] Last: Object with automatic storage is destroyed when its scope ends In firs... (by MiiNiPaa)
classes and object orientated programming
 
ok so my problem is that my mutator functions are not working when you run the program. its a bank program were the user can deposit or withdraw money. when i u...
[2 replies] Last: yes it was sir/mam... this was also backwards. void Bank::setBalance... (by MaseratiDeluxe)
Two Programs that have no errors won't work.
 
Neither program gives me the the print screen min, max. they do terminate when a negative number is entered. #include<stdio.h> #include<stdlib.h> #include<...
[2 replies] Last: Two Programs that have no errors won't work. Well, the second progra... (by andywestken)
June 2015 Pages: 1... 678910... 32
  Archived months: [may2015] [jul2015]

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