Beginners - August 2014 (Page 11)

Can I use exceptions in the constructor?
 
Hello Sorry for my English in advance! Can I throw exceptions from the constructor? I want to send data to the Serial Port. And I want to control errors via ...
[9 replies] Last: > there are a lot of subtle considerations when throwing an exception ... (by JLBorges)
Problem in <string> class copy function
 
I'm trying to copy a part of a string to an array using copy function. Why does the following code not giving expected output? What is the reason and how t...
[3 replies] Last: How to solve this? Given the length of str and the value of n ,... (by cire)
nullptr problems
 
This is a code provided at www.cplusplus.com/doc/tutorial/dynamic/. The provided code doesn't work on my computer. I am using Code-Blocks and Microsoft Visual C...
[2 replies] Last: Thank you very much. (by OmidMech)
Member function of a class is not working
 
When I run the following code it shows me |24|error: no matching function for call to ‘info::show()’| #include<iostream> #include<string> using ...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/functions/ (by keskiverto)
by h4ever
How to access member using singleton? Visual Studio watch
 
How to access Stat in watch while debuging? I have singleton with Stat class keeping information about working path. Then I start program, I set working path li...
[no replies]
Can't run the program
 
I am new learner towards C++ and is doing my tutorial question. I simply dunno what is gong on with my program. must be some stupid mistakes I have done. please...
[5 replies] Last: I have resolved it. it is due to have two source file with one project... (by istante)
by shekhu
fflush
 
What is the use and need of fflush keyword ?
[4 replies] Last: thanks (by shekhu)
by zachmc
Actually learning to program
 
hey guys I'm fairly new to c++ programming but I've been finding it really annoying to actually learn how to program. I feel like all these tutorials online are...
[1 reply] : if you wanna learn you should buy a book this is not a class.It's just... (by cpm14)
Bool question?
 
How do equations in bools like this determine if it's true or false, and also after it does the first x*=1, how does it know whether to go onto the else or not?...
[3 replies] Last: @hellworld136 Correct. Even if the value is a negative number. (by whitenite1)
cant find silly mistake
 
Ok, so I'm obviously making some stupid mistake, but I've been trying to find it for 20 minutes so... Here is my class declaration file "game.h" //cla...
[5 replies] Last: Thank you Duoas and giblit! (by heyyouyesyouiloveyou)
Stack trace (stuckdump)
 
Hello. I wanted to ask if you can help me, on how to understand where is the problem , when the compiler give me this kind of error's : " 0 IterativeImprovem...
[2 replies] Last: Ok , where i can find the stack trace with symbols and context ? so i ... (by sheepnoir)
by ewilkz
Classic Hello World
 
Hello, I am having an issue with the classic hello world program. I seem to have an issue when inserting the line "system("pause");" . Could someone direct me t...
[5 replies] Last: To use system() put #include <stdlib.h> or in C++ #include <cstdl... (by Chervil)
Store Program
 
Write your question here. Hi everyone, I have to write a store program for my assignment. I did most of it but now I need to add these things in a...
[5 replies] Last: That really doesn't help me any other tips on how to add these things ... (by neel3123)
Unexpected value change
 
I'm writing a code that saves some values to an array in a class Grid. However, my index number changes mid code from 0 to 1, and I have no idea why. Please hel...
[1 reply] : Are you sure trapX is not out of bounds? (by Peter87)
create a program that differentiate between banks
 
Hello. I've created this code that differentiate between various uses of banks like for example if the user enters he went to bank to deposit money and then we...
[1 reply] : I've got plenty of pointers, but I think you may find the most useful ... (by rssair)
Store UTF character \u2587 into a char/wchar_t
 
When I print out \u2587, it prints out the character I want it to, but when I assign that to a wchar_t, and print that out. It prints some something else. ...
[2 replies] Last: If you are using a C++11 compiler, stick to u8 strings, and make sur... (by Duthomhas)
Problem with return value?
 
I have a getter object that is suppose to return a value of type bool(default value is false). When a certain condition is met, the return value for the getter ...
[9 replies] Last: Conditional breakpoints have limited expressive power, or the exact co... (by helios)
Number generation and variable types
 
How could I generate numbers from 000,000,000-000,999,999 in this format: 000000000 000000001 000000002 ETC. I can easily do this without the zero's in fr...
[9 replies] Last: Um... #include <iomanip> #include <iostream> cout << setfill( '... (by Duthomhas)
Code game
 
Hello, i am new to C++ and doing an assignment, "Binary Code Breaker" I've looked through the forums already before signing up and found a similar thread, wasn'...
[2 replies] Last: I have also made a binary code encoder and decoder mine gives it the k... (by kmtompkins)
Array Style Refinement
 
I signed up for a C++ class during my graduate studies in 2002. The class was cancelled, I took Java instead, and the Deitel & Deitel "C++ How To Program" 3ed h...
[6 replies] Last: I've now read several articles on code commenting and see how I could ... (by unixman)
August 2014 Pages: 1... 910111213... 40
  Archived months: [jul2014] [sep2014]

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