Beginners - December 2016 (Page 3)

randomize character
 
hi, is there any way so that a randomize number wont be the same ? like, this code : #include <iostream> #include <random> using namespace std; int ma...
[3 replies] Last: Annoyingly, random_device is not guaranteed to actually be a random de... (by Albatross)
Need Help Debugging my Code That Reverses the Words in a String
 
I need some help debugging my code. This code is intended to reverse the words in a string that is in the form of a sentence [assuming that the string does not ...
[2 replies] Last: Thank you for helping me refine and debug my code, I realized my probl... (by RandomRestore)
loops and classes
 
I can easily hard code the required data, but I am having trouble using a loop to enter the data into the class. Currently the program is skipping the first na...
[2 replies] Last: Thank you, I feel so silly. cin.ignore() should always come after the ... (by imohamme5)
How to integer overwrite to file?
 
Hello there, this is a program to count the miliseconds from the program starts and also write it in a file and next time when it open to read that number, coun...
[5 replies] Last: Anyways, i fixed it, it was a problem of ifstream myfile("elt.txt", o... (by CosminPerRam)
Dynamic Arrays and functions
 
Hi guys, This is the question I am attempting. Write a program to prompt the user to enter the size of an array followed by that number of integers which are ...
[9 replies] Last: Thanks alot! (by imohamme5)
Enum
 
I'm trying to learn how to use enum. Can I in someway use enum with functions? Like the three below, all three is different ways of sorting a list. //---...
[2 replies] Last: Yes! Thank you @Peter87 (by markusfurst)
by SKREFI
I have an error, please help
 
O get this error: Jump to case label [-fpermissive] crosses initialization of 'std::string a' switch(place) { ...
[1 reply] : Hello SKREFI, With out more code it is hard to say what is happening ... (by Handy Andy)
Set numbers in a for loop
 
If I have this piece of code, how could I get it to output a number before each line. So that output would be something like this, 1 Barack Obama ...
[2 replies] Last: for (auto& e : persons) { static int n = 1; ... (by Chervil)
Drawing arrows using FLTK
 
I have been stuck for some time trying to figure out how you add caps to lines which are drawn in FLTK 1.3.2, which is the FLTK version I am using with visual s...
[no replies]
by tNK
Need mathmatical logic advise help
 
Hello everyone, Firstly I just want to thank you in advance for any advise I will receive in this thread. I am open to any criticism whether it'd be harsh or...
[4 replies] Last: https://www.youtube.com/watch?v=n2HiWXHhSh4 (by closed account 48T7M4Gy)
Applying Array elements to New Array?
 
How can I save my original array as well as the new changes I made to it into another (bigger) array called NewArray ? I was trying various things without any ...
[4 replies] Last: JayhawkZombie, You are absolutely right. I guess I just doubled the a... (by MisterTams)
Deleting a person from a list, list, vector<struct>
 
Hi, I'm still working on my list. Now I'm trying to delete a person. It works fine except when I write the out the list I suddenly have a row with just a length...
[3 replies] Last: `remove_if()' returns you an iterator, you need to `.erase()' from tha... (by ne555)
cycle shifts
 
write the decimal integer n in binary notation and create all its left cycle shifts where first digit of the number goes to the end. For example, if n = 11, t...
[1 reply] : #include <iostream> using namespace std; int main() { int X,D,M,m;... (by biwkina)
Perfect numbers!!!
 
I need to make a program wich finds all prefect numbers in between two numbers given by the user: 1-51 = 6 and 28 are prefect,but I dont know how, I made a prog...
[2 replies] Last: @OP I don't want to discourage you but there aren't all that many and ... (by closed account 48T7M4Gy)
Is chess a good project for OOP?
 
These four topis should be topics should be covered at any cost in the project inheritance, abstract classes, polymorphism and diamond or virtual inheritance. A...
[3 replies] Last: And what about the king? What the pawn. Both are 'elastic' diamonds if... (by closed account 48T7M4Gy)
Regarding header file inclusion
 
I had learnt C++ in my +2 standard as a part of my subject. It was about in 2013. I used to include header files as #include<isostream.h>,not as #include<isotre...
[2 replies] Last: http://stackoverflow.com/questions/301586/what-is-the-difference-betwe... (by gunnerfunner)
by Ganado
Overwriting byte in binary file, cross-platform?
 
I figured out how to overwrite a byte (in-place) using 2x file streams ( see: http://stackoverflow.com/questions/6427698/write-to-the-middle-of-an-existing-bina...
[4 replies] Last: > I just want to be 100% sure that it is OK (cross platform) to have t... (by JLBorges)
Substring find, replace, erase or regex?
 
Hello everyone, i've read around many solutions to find and replace substring in a string. I'm a little confused. I need to parse a string as follow: /My...
[4 replies] Last: Another approach : #include <iostream> #include <string> #include <... (by Itago)
Bowling game score for unlimited looping
 
Hello, everyone. I am beginner for c. I hope to write a Bowling game score for unlimited looping. But I don't know why I can not run this. Please told me what w...
[1 reply] : If you want it to loop infinitely, you need a while(1) {} , not just ... (by Tyler T)
How to code in this situations
 
I want to make a program which switch letters. like enigma. ex) input a -> output 1) b 2)g 3)t.....
[2 replies] Last: I think so. I'm beginner, started just few months ago ;( (by paperdoll)
December 2016 Pages: 12345... 28
  Archived months: [nov2016] [jan2017]

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