Beginners - August 2013 (Page 3)

by ephekt
variable char problem in switch loop
 
I have to write a sort of blackjack program using a switch loop, I have most of it done but it needs to take letters for the face cards upper and lower case whi...
[4 replies] Last: Thank you for you help, I certainly will study this. It uses some thin... (by ephekt)
by yhu420
functions and functors
 
Hello everyone, Today I just found out I couldn't use a function in the generate() function (included in <algorithm>. I know I have to use functors but my ques...
[3 replies] Last: Thanks, it's working ;) (by yhu420)
dangling-else problem
 
(Dangling-else Problem) State the output for each of the following when x is 9 and y is 11 and when x is 11 and y is 9. The compiler ignores the indentation in ...
[4 replies] Last: a) if ( x < 10 ) { if ( y > 10 ) { cout << "*****" << end... (by vlad from moscow)
account code
 
There seems to be problem when giving total value junk value is stored even when itialised can anyone tell me whats the probelm #include"Gradebook.h" ...
[3 replies] Last: Thanks iHutch that was the exact problem (by Sharan123)
by GCODE
Subtracting 1 from an entire array (every unit)
 
This may be a rudimentary question, but I could not find an answer for it in the forums. I have written a code where the user input at the beginning determines ...
[1 reply] : 1. You can loop through it and do it manually, or, 2. You can use an S... (by LB)
New to c++ from MATLAB
 
Hey guys, I'm new to c++ programming from MATLAB. I'm trying to import a matrix from a .txt file to be manipulated in c++. I can get the file inputted into ...
[1 reply] : It looks like you had a copy-paste error. Can you edit your post and s... (by LB)
by giblit
Is this a good start? (1,2)
 
Is this a good start for my Integer/Math class? #ifndef INTEGER_H #define INTEGER_H #include <string> #include <iostream> class Integer { public...
[28 replies] Last: *Back to the topic* I decided that I will just work on finishing the ... (by giblit)
Classes / constructor problem
 
Hi, I am trying to learn the classes and constructor. And I have a problem in this code. #include <iostream> using namespace std; class vectorofint ...
[6 replies] Last: @Rekarth As you want that the array defined in your class would hav... (by vlad from moscow)
Tried for hours to make threads work.
 
Hi. I am about to rip my non-existing hair out and punch a hole in my monitor. I wanted to start learning how to use threads. But I haven't even been able to...
[3 replies] Last: I know that but VS2012 always stops working after about 2 days for som... (by Zerpent)
C I/O Question
 
I wrote this code to open a file to write records to it, then pass it in to a function for writting, then when I return from the function and go to read it has ...
[4 replies] Last: Thank you, I just modified it so it doesn't pass in &e and it worked. ... (by pronesti)
char variables
 
Hello there, I want to ask about how would I go about not making chars case sensitive like when the user entered 'A' but the char variable is 'a', how would I g...
[6 replies] Last: > I don't usually bother with islower to check a char if all I'm doing... (by JLBorges)
how to open a program with c++
 
So I have designed my own mini game as a present for my brother, and at the end you beat a dragon. I am trying to get it to run SlayTheDragon.vbs (that creates ...
[3 replies] Last: system("SlaytheDragon.vbs"); works for me, with a bit of a lag whil... (by andywestken)
by Jeckie
Visual Studio 2010 problem
 
Why I can't compile in Visual Studio 2010? I write simple code like this: #include "Stdafx.h" int main(){ return 0; } And I get an error: 1>...
[1 reply] : Reinstall your Visual Studio or try configure in linker options->"Addi... (by rhobar)
Arrays' simple problem
 
// arrays example #include <iostream> using namespace std; int billy = {16, 2, 77, 40, 12071}; int n, result=0; int main () { for ( n=0 ; n<5 ; ...
[4 replies] Last: oh i see! it seem i have a hard time grasping c++ concept ^_^'' (by Ladyney)
Noobs question
 
A minute ago i read this tutorial, #include <iostream> using namespace std; int addition (int a, int b) { int r; r=a+b; return (r); } ...
[10 replies] Last: okay thanks :3 for now on i will try to always use a return statement (by Ladyney)
Which thread library should I use?
 
Hi. I am currently looking at learning how to do multithreading in C++ to break the limit of just knowing how to run one. I use 64-bit Windows 7. So I guess ...
[4 replies] Last: Ok, I will take a look at it :). (by Zerpent)
Functions problem
 
Hello everyone! I have received your help lately with an enumeration type of the same program but now i want to continue my calculator program and here is what ...
[4 replies] Last: Thanks to you guys i have finished the final version of my program:D ... (by fluture)
some c++11 features
 
I'm trying to accommodate some new features of c++11. As a new programmer, writing it out in c++98 or C, seems absurd. So far, i believe these are some of t...
[7 replies] Last: A splendid code! I would now only append two minor changes #include ... (by vlad from moscow)
Which header version for C++?
 
After learning C++ for a few days now I am abit confused about which header files I should include in certain cases. I have noticed that there are different "ve...
[1 reply] : So should I always go for the "c..."-headers? When writing C++ speci... (by andywestken)
problem with loops
 
As of I know increment operator increases the value by 1, so does variable+1. but in this homework problem when i'm using increment operator the loop is workin...
[2 replies] Last: okay i'm an idiot. thanks it worked :P (by dumptyd)
August 2013 Pages: 12345... 51
  Archived months: [jul2013] [sep2013]

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