Beginners - August 2015 (Page 20)

by AVM8
Get total number of elements in queue
 
I wish to know how we get the total elements in the queue?
[2 replies] Last: LB thank you very much. (by AVM8)
Output Formatting Question
 
Greetings! I am nearly finished with a program that I am writing for a class, and can't for the life of me figure out why the output of this function isn't dis...
[7 replies] Last: count1 /= count1; This sets count1 to 1 instead of 0, so of course... (by LB)
std::hexfloat and std::defaultfloat not found
 
How come std::hexfloat and std::defaultfloat cannot be found. I get the error that no member can be found with both clang and g++. My g++ is on version 4.9.2 an...
[4 replies] Last: @JLBorges Cheers for the reply buddy. I will update both clang and g+... (by ChajusSaib)
Having some trouble
 
I am pretty new to C++, and I am having some trouble with a simple program. I've been working on it for a while but cant get the loop to work right. Basically n...
[7 replies] Last: Thank you guys for the help. I got it to work! lol. An yeah CodeWrite... (by ReaverZail)
by fguy
Brain cramp
 
Something like this should be dead simple. I can't believe it's not working. Here is my code... #include <iostream> #include <vector> #include <string> ...
[3 replies] Last: lol thanks (by fguy)
invalid operands to binary expression ('int' and 'string'
 
when i run my program I get the following errors: "invalid operands to binary expression ('int' and 'string')" and "no viable conversion from 'int' to 'string'...
[4 replies] Last: ok (by axxotador)
Trouble with _TCHAR and using _tcslen
 
Hey guys, I recently started reading the book Programming Windows Fifth Edition by Charles Petzold and I came about a roadblock. The book mentions a _TCHAR ...
[6 replies] Last: @JLBorges Thanks a lot mate! Including <tchar.h> made the program run.... (by fullchaos13)
by ygkuan
Numbers containing digit 1,2 and 3
 
Can someone give me a hint on how to write the code to find out whether number 0000 to 9999 entered contain digit 1, 2 or 3? I know doing % 3 is wrong cout <...
[4 replies] Last: And now for some fun mathematical reading: http://www.cut-the-knot.org... (by Duthomhas)
Program isn't working with big numbers (or maybe small) + floating point exception?
 
Hello, I've been messing around with a binomial probability program. I've been learning A-level stats (S1), but the book I have doesn't have a statistical t...
[7 replies] Last: [quote=fumbles22]I'll dabble in J after I get reacquainted with C++. A... (by kevinkjt2000)
by fguy
nested range-for loops and arrays of arrays
 
Greetings My goal is to use range for loops to print out a two-dimensional array. My problem is I don't know how to specify the type of the loop control vari...
[4 replies] Last: ok that works, thanks. (by fguy)
by KMagic
[SDL2] - Where is the error text displayed?
 
I am new to SDL2. In the examples that I found on the internet, the code to check whether there is error when initializing something look like this: if (!...
[2 replies] Last: Does SDL 2 on Windows redirect all output to files named stdout.txt an... (by Peter87)
Question about string
 
So i was trying to print hello world on screen using oop Here is my header virtual void Hello(std::string str); and here is the definition void Base::H...
[6 replies] Last: If pre-compiled headers are being used, turn them off: Project => Prop... (by JLBorges)
by DBBJAF
using a class (MFC) in Console application
 
hello how i can use a exiting class that include header file and cpp and just use it the orginal code was here :http://www.codeproject.com/Articles/319181/Hae...
[1 reply] : i asked my question from author and he said me that it can use it, be ... (by DBBJAF)
by YowHow
Unknown Override specifier. Noob question
 
Im quite confuse on headers Say for example I have this base class class BaseClass { public: virtual void Load(std::string msg); }; And a derive...
[6 replies] Last: I see. so thats why. its weird though, I thought that pragma once w... (by YowHow)
by YowHow
Im still confuse at Rvalue and Lvalue
 
SO LValue is the one to be assigned and RValue is the one containing it? Is that right?
[3 replies] Last: I see.. Thanks guys. I think I get it somehow. (by YowHow)
by UCLA
Including 2 classes in headers
 
I want to turn this single .cpp file into multiple ones but I'm having trouble doing so. I'm getting undeclared identifier and 'children' : is not a member of '...
[6 replies] Last: Note that you use Node inside class Trie, so near the top of trie.h, y... (by dhayden)
Editing element of a parallel array
 
I am working on a program which (in part) reads input through a function get_data(string , int , int&) then outputs the data in the correct format. The data is...
[8 replies] Last: Oh, I get it. "waSHiNGtOn,geOrGe, 8" is all one string. void to_tit... (by Duthomhas)
user input validation
 
My program is a ATM C++ program. I am using gedit in ubuntu to create the program. I have a txt file with pin,cardNumber,balance. The data is all numbers sep...
[4 replies] Last: fumbles22, To test a program just make up the data or write a program... (by CodeWriter)
Pointers and array problem.
 
So I'm experimenting with pointers and arrays trying to get the feel of using and understanding them more. The *ptArray value in my source seems to change and n...
[2 replies] Last: A visualization of what happens when you increment a pointer: myarray:... (by MiiNiPaa)
Segmentation fault?
 
Hello, I'm trying to write a C++ binomial stats program. For example, let's say I had a box of 3 lightbulbs. There is a 0.25 chance that a lightbulb is bro...
[2 replies] Last: Thanks! I'll have to remember that a segmentation fault is a memory p... (by fumbles22)
August 2015 Pages: 1... 1819202122... 28
  Archived months: [jul2015] [sep2015]

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