Beginners - November 2017 (Page 28)

Hi-Low Game
 
Hi, my name is Mike and this is my first question on cplusplus.com. I am a beginner that barely knows the basics. I am writing a simple High/Low Game where the ...
[3 replies] Last: @mickeraiello No problem. Just FYI, we all do little mistakes like th... (by whitenite1)
Help with tic tac toe problem
 
#include<iostream> #include<string> using namespace std; int main() { char keeplaying = 'y'; while (keeplaying == 'y') { char tic ; const int fill0...
[1 reply] : Hello MAZambelli4353, You are correct "this is a bad way of doing thi... (by Handy Andy)
Interfaces , Concrete Classes and Inheritance
 
this is a little drawn out but i have two interfaces IWireframe and IPointMeasureable Then i have Wireframe that implements IWireframe and then three classes...
[4 replies] Last: thank you. so i did have a thought its programmer dependent in my co... (by madaxe2018)
by jsbd29
Need help with Quit Function Please Help
 
When I select the options 0 should Quit the program ,but it asks me to enter another fraction without exiting . Can someone help me to fix this? thanks! the...
[2 replies] Last: I don't know struct yet.Thank you for the help :) I"ve changed the cod... (by jsbd29)
My code fully compiles and then shows nothing
 
it is a simple program that separates two 5 letter words, with a space after each letter, and as the title says, after it successfully compiles, it doesn't run....
[2 replies] Last: Actually I think I now have a fair idea of how the program should work... (by Chervil)
Writing a CRC function
 
Hi all I'd like to write a CRC function (for fun obviously!). I've read on wikipedia about how the algorithm works but I'm a little unsure how to implement ...
[3 replies] Last: So you pretty much have to use a string? it basically depends with h... (by closed account SECMoG1T)
program stops working
 
please keep along the lines of my program. Program is for insertion at end of linked list. #include<iostream> using namespace std; struct node { i...
[1 reply] : hello: i think your problem occurs when you try to transverse an empty... (by closed account SECMoG1T)
File Handling C++
 
The line of code given below is not making a new file named file7.cpp. And hence it is showing the value of tellp and tellg as -1 and seekg and seekp does not w...
[3 replies] Last: If you want to know "why" then you need to read up on the various para... (by Chervil)
FLTK buttons
 
Howdy I am writing a program that acts as a 15 puzzle game. I am having trouble with the function that switches the labels of the buttons. I confused on how to ...
[1 reply] : but -> callback( ( Fl_Callback* ) button_cb ); Why do you call this... (by Thomas1965)
Not Sure How to Get Rid of Error in Assignment
 
Can someone please take a look at my code and help me figure out what I'm doing wrong? I'm supposed to use arrays in a program that gets 10 grades from the user...
[4 replies] Last: I finally figured it out. I didn't need to use floats after all becaus... (by Living4God1991)
by Zydea
bubble sort breaks after 5?
 
For some reason, when I enter anything above 5 to be sorted, it breaks? Works completely fine if I enter 5 or under. #include<iostream> using namespace...
[1 reply] : for(int i3 = 0; i3 < 5; i3++){ cout << array << " "; ... (by Hengry)
by wnp007
Array base to pointer base
 
Can someone please help me out with converting the function from an array-based on to pointer-based it is for the selection sort algorithm. Thanks void selec...
[1 reply] : Take a look at this thread: http://www.cplusplus.com/forum/general/213... (by mbozzi)
by mcr1
matrix in 2-d dynamic array
 
Write a program to set up the following matrix in a 2-dimensional array. The array must be dynamic, i.e. must use pointers and the new operator for space alloca...
[2 replies] Last: #include <iostream> #include <iomanip> int main() { const std::s... (by JLBorges)
by sry90
Converting binary string to ascii
 
So my project is to convert binary string into ascii or convert ascii into binary string. However, when the program is checking to see if the input binary strin...
[1 reply] : bool valid_bin_number( std::string line ) { if( line.length() % 8... (by JLBorges)
Help with passing in a boolean for a function.
 
For my code I am trying to pass in a boolean isPowerTwo into the function void Shuffle, to check if the vector string restaurant is a power of two. However when...
[1 reply] : #include <iostream> #include <limits> #include <vector> #include <str... (by JLBorges)
by cienb
Ending an infinite loop
 
I am new to C++ and loops give me a hard time. There is a never ending infinite loop although break statements are include after each case. Any help would be a...
[1 reply] : those breaks can only get you out of the switch not the loop, the loop... (by closed account SECMoG1T)
by Hanske
Pointers - stored on the heap or the stack?
 
Hello all, I'm still a bit confused on where exactly the pointers are stored when calling for heap and stack. I've searched the web but haven't found an exac...
[12 replies] Last: Nice explanation helios. I understand now. Thanks again! (by Hanske)
by ncant
Input/Output Read Loop Crash
 
Hello, I am doing an assignment that requires me to read names and numbers from a text file. Everything I've written so far compiles, but for some reason my pro...
[1 reply] : This: struct seller { //... customer custArrs ; //... }; doesn'... (by helios)
Fl_Buttons char names
 
Howdy I am trying to create a series of buttons in a window. I am having problems initializing a set of char to use as names for the buttons. Every time I try t...
[2 replies] Last: Thank you. very helpful. (by closed account 91q28vqX)
by muratk
bool function problem here
 
It suppose to find "END" or "end" at the end of source string and if there is the word "end" at the end of the string , it should return true , else false Tha...
[3 replies] Last: #include <iostream> #include <string> #include <cctype> #include <alg... (by JLBorges)
November 2017 Pages: 1... 2627282930... 33
  Archived months: [oct2017] [dec2017]

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