Beginners - January 2015 (Page 33)

Const but not at initialization
 
Suppose I have a variable x in a function; and I may set it to two possible values (depending on function computation paths). Once I set x, I do not change it. ...
[5 replies] Last: Oh yes, I forgot about scope, thanks for pointing that out! (by DexterMorgan)
Encapsulation for my classes, and multiple classes, returning inputs
 
Hey guys, I am currently trying to set up a class for my simple menu program that will handle choice selection (1 through 2 right now to keep it simple). I am w...
[no replies]
false positive
 
in line 120 when im looking to see if i press enter it always thinks i did is this because i pressed enter earlier and how would i be able to fix it. #def...
[4 replies] Last: Just remove the : at the end of the link - the page will open. (by wildblue)
Why ambiguous? (function overloading)
 
I cannot understand why inside my main() the function myfunct(i) is ambiguous? I got the code from a book. I run the code(to some free IDE) and the error i get...
[5 replies] Last: Well overloading needs to know what type a variable is. If there is no... (by DarkLightHitomi)
sematic scope: static variable in CPP with explicit namespacing
 
My apologies if this has been brought up here before. Here is my sample code, class.cpp static int xx; namespace app{ class yy{}; } My questions is ...
[no replies]
Speed of math calculations
 
I need to perform trillions of calculations (order 10^9-10^10), which are quite repetitive: calculation of distances, angles (sin, cos) , etc. I was wonderin...
[4 replies] Last: Keep in mind that a modern processor can execute around a billion inst... (by dhayden)
Prime X-nacci modded Terms
 
I will copy - paste the problem here: The standard Fibonacci sequence is represented by the sum of the previous 2 terms. Generally, it can be expressed as: ...
[17 replies] Last: Yes, kudos to Norm B!!! Thanks for pointing out the problem. (by dhayden)
project to convert
 
Hi, I'm a new member here and I want a person who can help me with a project. I am a beginner in C ++ two months I practice . For example, I made ​​a "tic ...
[2 replies] Last: thank you for your link but I really struggle to succeed... :/ I have ... (by closed account GvMiNwbp)
writing integer values in char array elements
 
The program converts decimal to hexadecimal 1)I am having problems assigning integer values to char array elements how is it done. Im getting symbols for my ar...
[no replies]
what's wrong ?!
 
ok so.... I have this formula: T(n) = n(n+1)/2 where n = 123456789. I have to calculate sum of digits of T(n). long long int T = (123456790 / 2 ) * ...
[11 replies] Last: thank you dhayden ! now it works ! (by xgeutzu)
swapping variables is messing things up..
 
what the heck is going on with this program? the result I get is 1606422622, but why???? #include <iostream> using namespace std; int main(){ int ...
[5 replies] Last: Try this: #include <iostream> // using namespace std; int main() { ... (by JLBorges)
Increment Operator Question
 
Write your question here. How do you read this statement words[*stream_begin++]++; ? (1) Why is there an increment operator (++) after *stream begin and af...
[4 replies] Last: dhayden, Thank you very much for your comment. I added the parenthes... (by phztfte1)
pointer decleration
 
Greetings, I'm wondering about how to declacre my stuff. on my journey into c++, the internet has shown me theese: SomeType type; SomeType* type; SomeType *t...
[2 replies] Last: Thank you. this helps. Still a bit confused about this stuff, but i'm ... (by globalenemy)
by ilija
lshell 32 not found error?
 
So i was trying to compile my code last night and i noticed Code::Blocks refused to compile and displayed the message: error:lshell32 not found. I thought that...
[no replies]
Trouble with rand and srand
 
Hi there, Pretty new to C++ and OpenGL and this forum but help would be greatly appreciated. At the moment I'm trying to creating a simple animator program t...
[2 replies] Last: I see a mouch bigger problem here: Tons of global variables. You shoul... (by bugbyte)
by KPK333
need some explanation of stringstream()
 
I am new to C++ ( I only know a little bit of python, so, I am fairly new to programming as well ) I don't understand the' while(!stringstream(swap) >> width)'...
[2 replies] Last: Thanks ! (by KPK333)
I don't know how to draw a ASCll character
 
I am unsure of how to draw a ASCll character to work this code that i found on this forum post: http://www.cplusplus.com/forum/beginner/85814/ #include...
[2 replies] Last: Oops Thankyou that clears some things up (by Althalus)
by Matas
void main()
 
When void can be instead of int ? I mean void main() There is a programmer who writes that, and do not understand how does it work? (click on the first on...
[14 replies] Last: > Windows allows much larger values to be used, up to 65536 AFAIK, Wi... (by JLBorges)
get and set char *
 
Disclaimer. This is for an homework assignment (due in two weeks) and this is just one tiny aspect of the entire project that has been a major headache for me.,...
[12 replies] Last: Gotcha. Thanks for the input. (by Bdanielz)
input _bstr_t
 
hi my program requires i use _bstr_t how would i input this because i cant use cin. _bstr_t verification_code; while (true) { cout << "Enter p...
[3 replies] Last: Yes. std::string verification_code ; std::getline( std::cin, verifi... (by JLBorges)
January 2015 Pages: 1... 3132333435... 39
  Archived months: [dec2014] [feb2015]

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