Beginners - March 2016 (Page 11)

insertNextTo function, templated, and iterators
 
I was given a piece of code that declares a singly list, doubly list and a vector. It fills these containers with random numbers, sorts them, then calls a funct...
[3 replies] Last: Nevermind, got it to work. Made the following adjustment: template <... (by Arslan7041)
C++ Outputting individual digits and the sum(Correct order!)
 
Assignment for computer engineering, I get extra credit if I print the numbers out from left to right instead of right to left. You're asked to have the user in...
[1 reply] : #include <iostream> #include <iomanip> using namespace std; int ma... (by VDurkaDurkaV)
cctype doesn't have special characters function
 
It's a simple question I am trying to find a way to use special characters in a function so I can use that reference later when I want to check if the charac...
[3 replies] Last: Thanks Bdanielz!! it works!!! you the man! (by survivor31)
Blank Terminal
 
Hi all firstly I would just like to say what a great site, the documentation on hexadecimal and binary have been a great help. I have just started coding a few...
[6 replies] Last: cin >> d // std::cin is the standard input stream used with "narrow... (by RobiBue)
by jam47
Problem using the Modulo
 
Why 5 % 2 is equals to 1? How can I get the quotient of 1 manually? #include <iostream> using namespace std; int main(){ cout<<5 % 2<<endl; }...
[4 replies] Last: Thanks Peter87! I have now get it. I just divided 5 by 2 manually then... (by jam47)
getline problem
 
Hello, I'm having troubles with this part of my program reading song names including spaces. for (int i = 0; i < 3; i++) { cout << "Enter Artist first na...
[3 replies] Last: I have solved it I just decalred the strings how you did and changed ... (by cstudentc)
Calculate Time With Recursion?
 
Hey everyone! I have a quick question I was hoping to get help with. I need to write a recursive function that returns the amount of time needed to travel a dis...
[2 replies] Last: Your function always returns 1 on line 9 or 0 on line 13. Line 15 ... (by cire)
help please. vector subscript out of range error.
 
I am writing this function for merging two vectors in order. each vector should be in order already before merging, so check that in the beginning. after that I...
[2 replies] Last: Overall, the loop on lines 13-19 has very strange logic, not just in l... (by keskiverto)
by daym
OpenGL problem (glGenBuffers) - crash (access violation)
 
Hello, I am using OpenGL to work on graphics and all I'm using VBO method to generate buffers and do the rest but when I try to do that specifically when I ...
[7 replies] Last: So, you initialized GLEW after calling glfwmakecontextcurrent ? wh... (by xismn)
Using function overloading with constructors..
 
There was a "project" at my uni where i had to make a program that uses two constructors, a default one that sets some default values to the general parameters ...
[6 replies] Last: That's what i want to do, but i don't know how. (by mariosconsta)
Differences Between String, Float, Double, and Int variables
 
if someone could please explain the differences in these and when you would use them versus the others that would be great.
[2 replies] Last: int is for integer variables like -7, 0, 1, 100, ...... it take 4 byte... (by gurgen1997)
C++ advance
 
Hi guys.About 6 months ago I took c++ course and I finished it two weeks ago. During the course I was reading Steven Prata c++ and I want to get deeper knowled...
[no replies]
Is there simple way of setting console width in C++
 
The question is in the title: First, Say I want to have a console width of 25 characters, can I set it so that when I use cout, C++ will limit output to 25chars...
[1 reply] : A simple way. No. One possible way to do this is to overload the std... (by AbstractionAnon)
How can I use ASCII to loop through an array and count the characters in that array?
 
How can I use ASCII to loop through an array and count the characters in that array? So I have an array of char (c string) called message that I need to loop th...
[1 reply] : No need for nested loops. #include <string> #include <iostream> usi... (by AbstractionAnon)
Anagram program
 
I'm having trouble understanding why this program doesn't work. #include <string> #include <iostream> using namespace std; // Postcondition: the retu...
[1 reply] : line 12: The ; terminates the for loop. Here's a simpler version: ... (by AbstractionAnon)
by tNK
Need help understanding this code.
 
Anyone care to help me better understand the logic behind this code. Thanks a lot. #include<iostream> using namespace std; int main() { //...
[4 replies] Last: This might confuse a bit, but the array product is not going to u... (by RobiBue)
Help with c++ game
 
Hey everyone. I'm writing a c++ game for an assignment. We have to come with a simple game, and mine is where you play as a character and have to avoid certain ...
[1 reply] : This isn't particularly a C++ question; it's an algorithms question, a... (by Moschops)
by Bopaki
Getting an error when compiling a project
 
Write your question here. As soon as my project has two header files I always get an error in file Makefile.win on line 25. The error is: C:\Martin\MalikChap...
[6 replies] Last: When I removed one of the main driver testing programs from the projec... (by Bopaki)
by iyed91
C++
 
hello everybody , i'm now learning c++ and i have this probleme that i'm hopping that you help me with it , you see i want to display a file.txt on the desktop ...
[16 replies] Last: Maybe this is interesting: http://www.linuxquestions.org/questions/pr... (by coder777)
password masking help
 
string pass="secret"; cout<<"Enter Password:"; cin>>pass; cout<<"\n"; while(pass=="secret")...
[1 reply] : I searched the forum for "password masking" and this was the first thr... (by booradley60)
March 2016 Pages: 1... 910111213... 47
  Archived months: [feb2016] [apr2016]

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