Beginners - July 2008 (Page 14)

casting double to unsigned int
 
hi guys, how do i use casting for a double type number to correctly change into unsigned int type number for example: double dbl = 7.9992; unsigned i...
[3 replies] Last: Yes, then flooring works for you. No problem (by bnbertha)
Too much room
 
I'm currently using the IDE Microsoft Visual C++ 2008 Express Edition for c++ programs and I have found that it takes up large amounts of room to compile and ru...
[6 replies] Last: You can select to compile as debug, release, or define your own. Not ... (by bnbertha)
messed up sort
 
Can anyone shed some light as to why this small sort program doesn't work properly? #include<iostream> using namespace std; double swap (int[ ], int, ...
[3 replies] Last: Just looking over the code, Line 17, while(scan<=upper-lower){ would... (by closed account z05DSL3A)
CLASSES AND FILES
 
how can i store the private members of a classs in a data file (using fstream)
[1 reply] : You need a member-function that returns the value of the members. ... (by int main)
Random
 
I am making this random program for fun just trying some basic stuff but i would like to add that someone could input something say like the number 3 and only 3...
[5 replies] Last: If you look in your compilers projects directory, if you look really h... (by CamelCase)
Why?
 
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { cout << "static_cast<int>((12 / 10.0 - 12 / 10) * 10) = " ...
[2 replies] Last: Yes, it has helped alot! Thank you!!! :) (by TheAlliedCentralAxis)
Linker error in dev c++!! ld returned 1 exit status..
 
the error shows: [Linker error] undefined reference to `vtable for BASIC' [Linker error] undefined reference to `vtable for BASIC' ld returned 1 exit...
[2 replies] Last: Cool!!I've solved it! Thank you,Master! (by zzzzzzzzz)
Choice between ios::app & ::trunc error
 
#include<iostream> #include<fstream> #include<limits> using namespace std; int main() { string c, s, t, u, b; bool a = true; char d, e; char g; ...
[3 replies] Last: ios_base::openmode mode = ios_base::out; if(e == 'y' || e == '... (by Zaita)
Linker Errors
 
I have these two classes, where Delivery is multiply dependent on Coord. The goal I'm aiming for is so that Delivery will have #include "Coord.h" on top. Someho...
[2 replies] Last: Thanks for that. Code has been edited. However, the Linker errors are ... (by hardcore)
Totally new to C++
 
Like I said I'm totally new and i want to start learning some simple C++ programing. I've tried to download the Visual C++ 2008 Program from http://www.microsof...
[6 replies] Last: You mean you can't find the executable file of Visual C++ ? My shortc... (by Mitsakos)
trouble creating a *.h file
 
#ifndef AVG_H_ #define AVG_H_ float aver(float a1st, float a2nd, float a3rd){ return (a1st + a2nd + a3rd)/3; } For some reason, the file refuses to c...
[12 replies] Last: http://www.cplusplus.com/reference/clibrary/cstdarg/va_end.html (by Zaita)
by jrohde
Using new and delete on classes
 
Hello, Should be a pretty simple answer to this one, I would hope. Just need to clear up some confusion. I created a class called part {}. It behaves ...
[1 reply] : This was explained a few topics ago. What happens is when you use push... (by Zaita)
Unmotivated due to simplicity?
 
Every time I get on here and read and do a tutorial, I get a bit unmotivated. I don't feel like I'm getting anywhere near where I want to be when I'm learning t...
[9 replies] Last: EDIT: Note that I am on the "beginner" C++ tutorials. I'm studying an... (by Zaita)
prgrm compiles but all I see is the first cout. What am I doing wrong.
 
I am using dev C++ trying to use functions on this program. I got it to compile with out error but coming up with only the first lind of the output function. I ...
[5 replies] Last: At the end of your readalldata function output n to see if you are... (by closed account z05DSL3A)
librarie using, who?
 
Hi all, im new here and my english isn't the best, but for posting a Problem, i hope it last out. I have a big C++ librarie wich i want to use. I linked it ...
[2 replies] Last: It would help, if I have these headerfiles from the Library, but all I... (by climbah)
Program flow (skipping?)
 
I've ran across this problem a couple of different times now and was wondering if anyone could help me out a bit After entering the amounts, it asks for whic...
[2 replies] Last: lol thanks I should of seen that b4 still not right tho. after it g... (by ieetglue)
by dpux
why do we use private functions ?
 
i am pretty new to cpp , so i would like to have a bit detailed explanation. if we use the scope operator for restricting the use of a function to a given clas...
[2 replies] Last: The scope resolution operator :: is used to resolve objects in name... (by Duthomhas)
what program do i need?
 
hi everyone, i just wanted to start with programming c++, but i didn't know what program that i needed for it. Can i just start programming on my notepad? an...
[3 replies] Last: Hi Simpleasy, welcome to the forums, and I wish you luck with your stu... (by CamelCase)
Friend function
 
When are we supposed to use it? How can we declare it? Thanks in advance.
[1 reply] : You shouldn't use it in a well designed OO application. Inside the ... (by Zaita)
Funny, quick program to try
 
#include <iostream> using namespace std; int passwordinput; int actualpassword = 4; int securitybreachnumber = 50; int x; int main() { cout<<"...
[no replies]
July 2008 Pages: 1... 12131415
  Archived months: [jun2008] [aug2008]

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