Beginners - June 2015 (Page 7)

Outputting text from Array/Vector
 
I am having quite a bit of trouble just getting user input/ or even storing strings, etc. so let me lay out my problem. Personal Project, so no limits, I do ...
[2 replies] Last: Move using namespace std; to just after the #lincludes Andy... (by andywestken)
What does the 'new' operator exactly do?
 
What does it do? Could someone explain why we need it and how we can use it in other ways? Much appreciated. (LINES: 39-44) #include <iostream> #include <str...
[3 replies] Last: Operator or expression? http://en.cppreference.com/w/cpp/memory/new/op... (by keskiverto)
by cGuru
Cannot Access Data Of Struct
 
When I try to access my struct elements in another class function besides the one that modified it, it shows as empty: class Player { public: struct Account...
[4 replies] Last: I figured it out. It was a function that I didn't list here. (by cGuru)
Chess Queen moves [Help] (1,2)
 
So I was asked to build a chess game that only contains a queen and the queen must not have another queen in its side vertically,horizontally and diagonally bec...
[23 replies] Last: Thanks @AbstractionAnon!. Now my program is complete :). (by kroragna)
.txt RGB array to BMP FAULTY OUTPUT
 
Hi everyone, My purpose; RGB values at txt,To convert a file in BMP format. Bmp to blabla.txt #include <iostream> #include <string> #incl...
[7 replies] Last: It is OK Thanks to everyone who helped (by dangerzone37)
How can i read/save from txt?
 
Greetings cplusplus users! This is my first question on this site, and please, forgive me if my english is not perfect!! Actually i'm having some trouble wi...
[9 replies] Last: Yeah the character separation is always the "," (by Siberius)
calculations are different in ide vs school server
 
hi, so the results of an average() and summation() functions are different in my ide (visual studio) and the school server. e.g 1, 2, 3, 4, 5 - avg: 3 -...
[2 replies] Last: Definitely show your code. What is "a"? Are you reading that from a ... (by dhayden)
complex matrix
 
hello, i want to initialize a 2x2 matrix with complex numbers but i don't know how i can ! thanks in advance
[9 replies] Last: I made an example how to do that. Just continue to multiply resulting ... (by MiiNiPaa)
C++ Class Error (no matching function call)
 
So I am writing a mini (very mini) game in C++ and Qt like the space shooting game where you shoot ships, although a bit modified. So there are two classes, one...
[1 reply] : Morning, You've given your class a constructor: EnemyHealth(QGraphic... (by mutexe)
Simple multiple choice question; Assignment Operator
 
1. What type of copy is performed when using the assignment operator with two objects if the assignment operator has not been overloaded? a. Carbon copy b. S...
[5 replies] Last: Thank you so much. (by Elysian)
by iEpic
Cannot figure this out!
 
Hello everyone, this is my first time posting here and I hope someone can help me. I am having issues with getting my code to work. It works fine with VS2010 ...
[6 replies] Last: I've been trying for hours and finally just gave up haha. I can't figu... (by iEpic)
Strange problem when compiling a program
 
Hi, every time i try to compile the following code the compiler strangely opens another window with another code in it (that i didn't write ,i know i'm missin...
[2 replies] Last: Sorry ,i wasn't sure if it is more suitable with biginner or general c... (by mescalito)
by Ch1156
DLL question
 
Ok so i've been thinking about creating a simple DLL just for fun, I believe It's a file that contains re usable code like a string search algorithm or somethin...
[5 replies] Last: ok, I got it working thanks! (by Ch1156)
2d array max min
 
I dont understand the error #include<iostream> #include<cstdlib> using namespace std; class MaxMin{ int r,c,max,min; int **p; public...
[4 replies] Last: One has to start from the first error; some of the later errors may be... (by keskiverto)
Recovering from errors
 
Hi, I'm a beginner in programming and I'm studying the C++ programming language using the book : Programming principles and practice using C++ . I'm here today ...
[3 replies] Last: IMO, exceptions are overkill for editing user input. It is much simpl... (by AbstractionAnon)
What do these lines of code mean?
 
Question says it all. //Number 1: int length; length = (int)input.length(); //Number 2: isalpha(input )
[4 replies] Last: http://www.cplusplus.com/doc/tutorial/arrays/ (by MiiNiPaa)
by cGuru
Alphabetical Sorting Algorithm Help
 
My program is freezing when I run this code which makes me guess that it is going into an infinite loop: Note: I already sorted them according to length, that...
[10 replies] Last: In that case lines AC and AB would be threated as if they were in corr... (by MiiNiPaa)
Copy constructors for vectors of pointers
 
I'm trying to make a copy constructor for the following class, but since I got a pointer vector of pointers (I know it sounds silly =p) I don't know if it's eno...
[5 replies] Last: You should try to avoid pointers as often as possible(especially raw p... (by Gamer2015)
Question about a while loop, file input and output
 
Hi everybody. Now I know I shouldn't ask homework related questions, but I'm kind of stumped. I'm working on a program that reads data in from a file, 4 names a...
[3 replies] Last: Why not just read it all into a vector, or some other container. You o... (by admkrk)
help!!some probnlem about“unhandled exception”
 
somebody help me! run the code there comes "unhandled exception in ...:0xC0000005:Access Violation." #include<iostream> #include<fstream> #include<sstream> ...
[2 replies] Last: Thank you very much for coder777! I changed all the wrong you point o... (by qwerwan5)
June 2015 Pages: 1... 56789... 32
  Archived months: [may2015] [jul2015]

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