Beginners - November 2014 (Page 32)

by thor36
"pow" returns 1, although from maths standpoint it is not correct result
 
Hello all. I have a piece of code that uses the power function "pow", it looks like this : double a, pow2, base2; base2 = 15.51003028914760; pow2 = 2/3; a = ...
[2 replies] Last: That was it, thanks ! (by thor36)
Calling a fuction
 
I am trying to write a program that calls a another program to round a given a number. The program needs to display one of three possibilities based of the choi...
[5 replies] Last: In the first snippet, you are passing only one parameter on line 15 wh... (by Zhuge)
by clodi
missing ';' before '<class-head>'
 
Hello, VC++ is complaining about something but not sure what it is.. The title shows you what error i get and the code below is where the error is.. #pra...
[5 replies] Last: F**K!!!!!!!!!!!!!!!!!!!! Thank you so much.. :) (by clodi)
by kabuki
Template and classes
 
In my book, it describe template as a tool like a stencil. It is very generic and can become any data type. I know that it can become an int, float, etc. but ca...
[2 replies] Last: Okay thanks, I was confuse. I only need to overload operator==. (by kabuki)
Dynamic memory allocation in Table 2D
 
Hi everyone! I allocate memory in 2D table by the method as you see in my code. Program compile good. After running of program i write down these: Write dow...
[4 replies] Last: Ok now I solve the problem thx very much my code now looks like this: ... (by martin619)
Convert nested for loop to nested do while loop
 
I am trying to convert a nested for loop that prints a right triangle into a nested do while loop, and I'm stumped after over 3 hours. Here is the nested for...
[1 reply] : Holy cow, I finally got it! I realized one of the issues was that I n... (by elliott22)
When should i use the "this" pointer?
 
I know the pointer returns the instance of a class but.. the thing i don't understand is when i should use "this" pointer. Should i only use the pointer when ...
[2 replies] Last: The this keyword is also useful if you want to pass the object to a fu... (by Peter87)
returning multiple values from a function
 
hi, im trying to pass 3 variables from a function to main() but only the very last variable is being transferred. Can anyone give me a hint as to why? thanks ...
[3 replies] Last: i got it, thanks for your help. (by Wilderness)
when should I move from one chapter to another
 
Hi guys.i spend a lot ofstime reading c++ books.more than 10 hours per day. And I can read 2 chapters each day. But what I want to know is when should I move ...
[4 replies] Last: thank you all for your your help! (by xxgixxx)
by Walnut
Adding libraries
 
Hey there! I'm a very beginner programmer, and I know basic C++. But the problem I always seem to have when trying to add a library is I will get some error...
[5 replies] Last: Wow thanks so much rjvc! That was exactly what I was looking for and n... (by Walnut)
error passing 'const Filesys'
 
I am getting an error line 5 of filesys about passing 'const Filesys' as 'this' argument of std:string Sdrive I am not able to see why looks like it is passing...
[8 replies] Last: Awesome thanks guys think I got it figured out now. Sorry so late on r... (by cory244)
Error reading from file
 
I'm attempting to read from a file that has two lines of data, a date and a weight. It loads the first data set correctly, but when I try to output vector , I g...
[2 replies] Last: Anyone see whats wrong? (by closed account 3R5fjE8b)
Do-while loop issue
 
Hello, I am sure this is not hard at all but I'm pressed for time...I believe this is good except it's performing an infinite loop. I want it to continue prompt...
[8 replies] Last: oh like a Bool ? How would I implement a bool to this? Well, I'm not ... (by helios)
Encryption and decryption with vector and rotor?
 
Im working on this project requiring using vector and rotors to do the encryption and decryption. I have no idea where to start. Any expert who can help? htt...
[1 reply] : Make a class with a constructor taking the multiplier/divisor and the ... (by ShodanHo)
Help Bullet C++
 
I'm writing the Contra Game by Directx9 and c++ please help me about list of bullets i'm trying below code but it's error: vector intertor incompatible st...
[1 reply] : i'm trying below code but it's error: vector intertor incompatible Is... (by MiiNiPaa)
What is the point of overloading operators in classes?
 
I have just started learning about overloading operators but i don't seem to understand their purpose. Please correct me if I'm wrong, but i will try to expla...
[4 replies] Last: Ah thank you, I completely forgot about the operator keyword. I made s... (by SomeAmazingGuy)
by lmm131
multithreading
 
Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-proc...
[1 reply] : See my answer here http://www.cplusplus.com/forum/beginner/147855/ (by dhayden)
by lmm131
multithreaded solution
 
can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single-processor system?
[1 reply] : It depends on the program but frequently yes. That's the reason for mu... (by dhayden)
Compiling custom headers
 
I'm using Linux Ubuntu and compiling with G++ 4.8.2 if that helps I've been playing around with creating my own header files, trial and error and reading onl...
[no replies]
by Danny7
continue statement with more
 
im working on an assignment for class and i am completely stuck i try different things and get different errors. what i am doing is writing a program for guessi...
[8 replies] Last: am i doing something wrong? i just need a continue in there but if i c... (by Danny7)
November 2014 Pages: 1... 3031323334... 65
  Archived months: [oct2014] [dec2014]

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