General C++ Programming - September 2015 (Page 14)

Why while loop is not terminating in this program??
 
#include "std_lib_facilities.h" // authors header file i am using int main (){ constexpr int MAX = 5; vector<int> monitor(MAX,1); vector<int>...
[4 replies] Last: Thanks friends..silly mistake..sorry to bother. (by sankar86)
reading matrix rows, cols, values from file
 
The first and second lines of the file will contain the number of rows and the number of columns respectively. The remaining lines in the file will each conta...
[14 replies] Last: Cheers :) (by closed account 48T7M4Gy)
Converting a char array into a an int holding value
 
Hi guys, I have a homework where I create a file and place grades such as A B C D and F; meant to stand for the students grades. I create a program where I read...
[3 replies] Last: float accumulator = 0.0f; float studentGPAs[*]; //* represents numbe... (by Renthalkx97)
by c noob
filter out in C++
 
letter: upper or lower case a through z vowel: the letters a, e, i, o or u consonant: letters that are not vowels word: a sequence of sequential letters and/...
[no replies]
Rotated image moving with SDL
 
I am making an asteroids kind of game with SDL. For some reason whenever I rotate a ship it moves in a weird pattern. You can see what it looks like in this qui...
[4 replies] Last: Awesome! It works now. Thanks for the help (by Bingocat4)
c++ problem with code
 
Hi, I have a problem with my code. I'm trying to put the first name and name on the same line together. My getline doesn't seem to work. What am i missing? ...
[5 replies] Last: There is no space in between. Output space after you output first nam... (by MiiNiPaa)
Connecting rooms with halls
 
I used BSP algorithm to split my map into subsections. Each subsections has 1 room inside. I cant figure out how to connect all these rooms. Currently i have ...
[3 replies] Last: Anyone have any ideas? (by vastrolorde)
help me please
 
-
[11 replies] Last: There is nothing left to read in this thread, which is now completely ... (by minomic)
by Andym
reading words from a text file
 
why doesn't the file reading statement in the code below return "Harry" & "Houdini"? It seems that, based on the info I have found, it should return the 1st 2 ...
[5 replies] Last: for( const student& s : students ) // for each student 's' in the vec... (by JLBorges)
can anyone help me for creating this?
 
Hello, I would like if someone help me for creating a assigment. I Called it cyber investigation system Features: Admin and user permission Crimina...
[no replies]
by JLGo
Error in Input
 
// // main.cpp // Labtask4_2 // // Created by go jialun on 12/09/2015. // Copyright (c) 2015 go jialun. All rights reserved. // #include <iostream>...
[2 replies] Last: Thanks ya...I have figured out... (by JLGo)
How to prove that the delete operator is working?
 
My CS teacher asked me to prove to her that the delete operator is working? I wrote the following code: #include<iostream> using namespace std; struct a...
[7 replies] Last: @LB cout << *(ob.prats); prints '0' which I agree is not an error. ... (by closed account 48T7M4Gy)
Making a static member function a friend
 
I have the following code: class A { int x; friend static int B::DoIt(A& a); friend int DoIt2(A& a); }; class B { static int DoIt(A& a); }; ...
[2 replies] Last: Wow. Apparently VS's intellisense was lying to me, it compiled just fi... (by firedraco)
Multiple or single modifier sections
 
Hello everyone) Recently I've had an argument with my calleague on how class members have to be organized - should I place them in multiple modifier sections ac...
[2 replies] Last: @MiiNiPaa thanks) (by Diredko)
Is this a const pointer?
 
The statement int const*ptr=&<any variable>; Does not give any syntax erro.. But what is this??
[1 reply] : int const*ptr=&<any variable>; I believe any variable is a type of ... (by MiiNiPaa)
how to add border to output screen
 
im doing my c++ project so i hav decided to add border to my output screen but i dont any idea about how to add border to output screen so please me
[2 replies] Last: yes (by prajesh)
Generate all configuration of given array
 
If I have an array: 0 1 2 3, and the output is: 000 001 002 003 011 012 013 022 023 033 111 112 113 122 123 133 222 223 232 233 333 How th...
[10 replies] Last: > eventually flipping back to the first. no, not the first. #include... (by ne555)
issue with inheritance inheritance
 
Hey, I am working on an assignment that basically wants me to create a header class called BankAccount.h and then create A CheckingAccount.h and a SavingAccount...
[2 replies] Last: Hi, I got help with it, I needed guards on my BankAccount.h and to m... (by TheIdeasMan)
Creating Functions (Modular Programming)
 
I have several errors, but i do not know what i generally did wrong?? #include <iostream> using namespace std; //function declarations float getPurchaseAmou...
[8 replies] Last: #include <iostream> using namespace std; //function declarations flo... (by closed account 48T7M4Gy)
Cout gives error of undeclared identifier
 
This keeps on getting the error: "Undeclared identifier" even though I have the #include <iostream> on there. I realized that whenever I do not have the #includ...
[1 reply] : Turn off precompiler headers and do not include "stdafx.h" . http:/... (by MiiNiPaa)
September 2015 Pages: 1... 1213141516... 21
  Archived months: [aug2015] [oct2015]

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