Beginners - November 2016 (Page 6)

arranging string elements
 
I'm close to making this work. I'm trying to get the months to be organized with the number they are assigned and arranged by number from highest to lowest. ...
[2 replies] Last: yes that worked. thank you so much. this has been puzzling me for a wh... (by SkarFaceT9)
string repeat on a max key of map
 
I am attempting to print the keys of a map. The format I would like is K1 | .. .. K99 | I need to therefore count the number of digits in the key, and...
[2 replies] Last: I figured out! #include <iostream> #include <vector> #include <map>... (by bluefrog)
Reading from a text document
 
At function searchByDate when I want to display all the employee's the string only display just the first employee, then I need to press enter to display anothe...
[3 replies] Last: Yes. (by Golden Lizard)
by kmce
Header files
 
I am using different header files, something ive never done before, I have always just had everything in the main.cpp but I am wondering, I know I am meant to d...
[3 replies] Last: In header 1 line 5 you include header 2. In header 2 line 5 you inclu... (by Nico)
A quick question about while loops
 
I'm just curious about how exactly a simple input file will be effected by a while loop. For example I have a file that lists a number, followed by a group of ...
[4 replies] Last: Would getLine actually work though? I thought it grabs the whole line,... (by Miles Hikari)
abstract class
 
Hello guys i want to ask, what is the problem i got error message cannot declare variable cocktailMachineObj to be of abstract class type CocktailMachine , b...
[4 replies] Last: ahaa thx gunner now its work :D (by mustain5)
by osur
Simple OS : Memory
 
Hello, For a project, I am tasked with making a very, very small operating system simulation. The program would be given some amount of memory by the user, and...
[no replies]
by ryard
c++ algorithm
 
I had a problem in understanding the algorithm of this program.Can you tell how this program is working ?? void fungsi(int a, int &b,int &c) { int y=1;...
[4 replies] Last: Hello ryard, PLEASE ALWAYS USE CODE TAGS (the <> formatting button) w... (by Handy Andy)
[SOLVED]Return Template , It says T does not name a type
 
I'm doing assignment where i make two function template with two arguments that return the the Max and the Min. While im compiling the program, it says T does n...
[10 replies] Last: #include <iostream> template <class T> T min(T &num1, T &num2 ) { i... (by JLBorges)
by AK3000
Copy constructors
 
I'm confused how each object calls the member function. can anyone give me step by step working of this code #include <iostream> using namespace std; class ...
[no replies]
Create custom classes - in Dec, the stack (LIFO), queue (FIFO) based on the class list the STL
 
Create custom classes - in Dec, the stack (LIFO), queue (FIFO) based on the class list the STL. Write a test program that is in test mode It performs operation...
[7 replies] Last: That's great! Mind sharing? (by gunnerfunner)
make "pause" in loop
 
there is a cycle which displays color-continuously. And there's a user who clicks the game start, pause and exit. I can not bound pause during a loop ((somebod...
[1 reply] : If you want to be able to pause the game at any time during the progra... (by Golden Lizard)
Problem with file types
 
So basically I found a program in some forums but it had static string while my program had dynamic string. I tried to change the program I found but I have run...
[4 replies] Last: But if I change c type to float then lines 53 and 57 don't make se... (by Nekodan)
Modify and delete specific file content
 
how can i delete and modified my file content #include<iostream> #include<fstream> #include<string> #include<stdlib.h> using namespace std; int m...
[1 reply] : An example of reading from the file into a vector, and deleting from t... (by Chervil)
write string to txt file and print it later
 
im quite new to c++ and this is my problem im writing a program where user can input a string and two integers of their choice the inputs will then write into...
[4 replies] Last: oh oh, thank you so much bird1234!! as for golden lizard, thank you so... (by ashton vern)
How to change the specfic file content fstream
 
source code #include<iostream> #include<string> #include<fstream> using namespace std; int main() { string name, program; string name1, progr...
[4 replies] Last: thnx (by bird1234)
Lo Shu Magic Square with Three Functions
 
Hello everyone! The specifications of my current CS project (Intro to Programming using C++) have left me a bit stumped I am afraid. It is a Lo Shu magic sq...
[6 replies] Last: I couldn't seem to get the comments in there without it looking like a... (by Angrboda)
by graf
Array not running after file prompt.
 
I've been struggling with this for a few days now. I've finally got it working in pieces, but when my sorting array runs, all I get is empty space. My brain is ...
[1 reply] : You already go through the file once before the for-loop. Thus, when y... (by Arslan7041)
How to put C++ application into my Window?
 
I can write simple C++ applications and now with Win32 I can create a Window with a menu bar, scroll bars and such. What I don't know how to do is put my appli...
[4 replies] Last: Thanks FurryGuy. (by hotepmichael)
celsius to fahrenheit for loop question
 
im trying to write a loop which will show when Celsius equals fahrenheit. The loop counts down from Celsius = 100degrees and the loop stops when the 2 temperat...
[1 reply] : Why are you declaring c in two places? Lines 6 & 8. Declare c in o... (by boost lexical cast)
November 2016 Pages: 1... 45678... 44
  Archived months: [oct2016] [dec2016]

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