Beginners - June 2012 (Page 42)

by ortymd
sqrt() function
 
Good day. I calculate the square root of modulus of two numbers. Modulus operator requires both operands to be int and returns int. At the same time sqrt() is ...
[5 replies] Last: kbw (4423) Jun 6, 2012 at 8:41pm Do you have overloaded sqrt()? T... (by ortymd)
by blake
Trying to self-teach, need guidance
 
So I'm thinking about going back to school and pursing a degree in CS. Figured before I dove right in that I'd try to teach myself C++ and see how it goes, but ...
[6 replies] Last: Thanks guys I got it working. I'm sure I'll have many more questions a... (by blake)
Detecting File Info (saving game info)
 
So I want to save my game in a single .txt file, that way I don't have to search through a ton of different files to load the game. My idea is to save a chara...
[1 reply] : Check out comma-separated-values: http://en.wikipedia.org/wiki/Comma-... (by Lowest0ne)
Help Please!
 
Hi, i have got Quicksort algorithm code, but it has got many mistake. I can't fix it. Please help me #include<iostream> #include<math.h> #include<stdlib.h>...
[5 replies] Last: up! (by Grange12232)
Problems with a for loop Visual C++ Express
 
I am writing a program to have the user enter numbers which will in turn be placed in an array. This array will then be printed on the screen I am using a For ...
[1 reply] : I do not know this language but your code contains obviously invalid c... (by vlad from moscow)
Constructor's usage
 
// operator new example #include <iostream> #include <new> using namespace std; struct myclass {myclass() {cout <<"myclass constructed\n";} ...
[7 replies] Last: Hi @Cubbi, Thank you, the codes should be fine now :) (by lixinsbgtf)
Conceptual doubt:
 
when i just declare an integer or other variable, no memory is allocated to it. So, then if i do cout for that variable, what exactly happens?, is there any gar...
[6 replies] Last: Memory *is* allocated to it, but the program doesn't initialize it wi... (by moorecm)
selecting random value from enumerated set
 
#include <iostream> using namespace std; int main ( ) { int ace, score, cards_wanted, random_number; char space, first_try; space=' '; enum...
[2 replies] Last: If you are wanting to "deal" cards it's probably better to construct a... (by Texan40)
Raise event error
 
I am getting a acompile error and I don't understand how to work through this. Can anyone enlighten me a bit? Here is the error from the compiler. error C37...
[3 replies] Last: Well, the error clearly states that the class Mach4::CMach4DocClass::... (by closed account zb0S216C)
please :)
 
HI how can i convert fraction to integer example: the number is 0.45 i want make it 45 how can i do it ? thanks :)
[8 replies] Last: Very good response, I'm a bigger fan of modulus, but it doesn't work w... (by Volatile Pulse)
by kethgr
File output problem
 
Hello everyone. I'm trying to write a program that decodes a message using the Caesar cipher (which I'm guessing a lot of you are familiar with). It's supposed ...
[17 replies] Last: Good advice. Thank you. (by kethgr)
by abbzi
Can I just know what's wrong with my code.
 
hello, I've found this question on the internet and tried to solve it, I'm a computer engineering freshman, and I thought I can try to strengthen my coding skil...
[12 replies] Last: Yeah I noticed that and felt like a dummy after posting it, my apologi... (by Volatile Pulse)
Randomized Numbers
 
Okay I'm writing a program to help me learn my summer science memorization homework, and I need a random number generator. When I took my programming class my ...
[2 replies] Last: It did help, and I was going to ask for code examples, but I got a hol... (by closed account iN6qM4Gy)
Solving a problem
 
Hello .I'm having problems solving this : Using classes, generate a list (created dynamic) of integers, read from the keyboard . Read and display the reflected ...
[1 reply] : Can you please post some of your own code so people can help you out i... (by thechad90000)
Class initialization problem
 
Hi, this is sort of a follow up on a previous inquiry I had (http://cplusplus.com/forum/beginner/68176/). In it I have been wondering how to get data into a cl...
[4 replies] Last: yes! that is what I would like to do. And that works for data_ as I am... (by benbehr)
cin.get() VS. system("pause")
 
So, here's the big deal... I have both Code::Blocks and Dev-C++ I use them alternatively, and it's been doing fine. Okay, here's the main questio...
[9 replies] Last: Which is better to use... cin.get(); or system("pause");? None, run ... (by ne555)
by leeto
Array of class with inheritance
 
Hi,all and thanks in advance. Shape base class, line and Point derived classes. What should I declare in .h files and implement in .cpp files that this is arr...
[9 replies] Last: Shall be shapes instead of s . Sure, but Shape* shapes ; As you s... (by ne555)
Where can you download c++
 
I searched for c++ a long time and i can't find a download. so if someone knows where to download it, thanks.
[2 replies] Last: Thank you very much now i know how to use it. (by pieterdekunder)
by Rii
Error: initial value of reference to non-const must be an lvalue
 
Hello there, I've been trying to draw some lines with caclulations, but I've been unable to due to one error I don't understand. (intellisence error(mouseover) ...
[4 replies] Last: @all: thank you all for the replies! I removed the references, it's wo... (by Rii)
by ortymd
floor() and ceil()
 
Good day. I would be grateful if someone explained why floor() and ceil() functions (math.h) return double or float values. As far as I understand they jus...
[4 replies] Last: Well, the range of a double is even greater than the range of a float,... (by Cubbi)
June 2012 Pages: 1... 4041424344... 51
  Archived months: [may2012] [jul2012]

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