Beginners - September 2009 (Page 6)

by Winky
Handling Exception in a class
 
First of all: I'm a noob to C++ and oop in general, so I would like to thank you for the opportunity to ask noobish questions. Second: I searched in the for...
[2 replies] Last: Thanks for your answer! Atm my code looks like this: int MyClass:m... (by Winky)
Is return 0; really necessary?
 
Becoming an intermediate programmer and game developer, I don't really ever tend to use return 0. Is it really that necessary? Why? I just want to make sure I d...
[3 replies] Last: C++ specifically allows you to fall off the main () function without ... (by Duthomhas)
How can this be causing a segfault?
 
I've been searching for the source of a segmentation fault for a long time, and I eventually narrowed it down to a single for loop. I couldn't figure out what ...
[6 replies] Last: Well, thanks everyone who responded. I just went and moved the loop i... (by Impacatus)
by a9642
Compiler setup and use
 
I'm looking for instructions on how to setup a compiler on my Windows XP machine, and then actually compile a C++ program. I'm a long time programmer in interpr...
[8 replies] Last: Thank you for the clear step by step instructions! I'm still iffy on M... (by a9642)
dont laugh i just started this but y isnt this working
 
#include <iostream> #include <cmath> using namespace std; int main() { char input; char choice; double a,b,c,d,e; for (;;) { do {...
[10 replies] Last: Gotos are generally a bad idea. They create what is called "spaghetti ... (by JCED)
Pointers: Assign Address?
 
Can you assign an (arbitrary) address to a pointer? Example: int GetAddy() {.... float addy = &some_variable; return address; } Can a ...
[5 replies] Last: no reason in particular, except for the fact I am a beginner and have ... (by Triryche)
by wtf
Is there a scanf.ignore function comparable to cin.ignore?
 
I've figured out a way to replace most all my cins and couts with scanfs and printfs with the exception of these 2: cin.ignore(); What comparable function...
[1 reply] : I can't say I know a lot about C-style console I/O, but here are my im... (by Zhuge)
Do while c++ loops problems
 
I am tasked to make two program using do while loops in c++. can anybody help me? Exercise 1: This is should be the display sample 1 input 1: 1995 I...
[6 replies] Last: You could add that a do... while loop also is guaranteed to always exe... (by chrisname)
functions that don't always return a value
 
Hi, This might be a simple question but I didn't know how to word it exactly... I want a function to return a value only if the parameters are satisfied: ...
[3 replies] Last: You are splitting up an input operation arbitrarily, and that is tripp... (by Duthomhas)
by navi
Angle Calculation is off only sometimes.
 
Hello, I am new to c++ and I am trying to write a simple win32 console application to calculate the sum of two angles. Basically the user inputs the angles i...
[4 replies] Last: Ahhhhhh I see it now, thank you guys sooo much! ^_^ (by navi)
by robezy
Trouble with operator overloading
 
Hi, I'm getting following error message g++ -c testBigNum.cpp -o testBigNum.o testBigNum.cpp: In function ‘int main()’: testBigNum.cpp:14: error...
[2 replies] Last: Thanks.. it worked.. i think I need to read the book again thoroughly.... (by robezy)
by luq
EnumProcesses and SKD's
 
Hi, I'm trying to use the function EnumProcesses to check whether a process is running or not. But when I try to compile it, it returns an error, (which I do...
[2 replies] Last: Thanks, I've found the MSDN thread with the same info, but the last ti... (by luq)
by ad1234
Error C2784
 
Following code is producing dozens of C2784 errors and I would like advice on why? I have int as "choice" as I tried Char with C or F to be input and I wondered...
[1 reply] : cout >> ... is wrong, should be cout << ... (by closed account z05DSL3A)
by robezy
how do i use ios::fail()?
 
Hi, could anyone tell me how to use iso::fail, i mean the syntax. I searched, but I couldn't see any sample code. Below is my code, which is obviously f...
[1 reply] : Just use in.fail(). There is no need for the "ios_base::" as with it y... (by Zhuge)
by robezy
Returning address of a local variable.
 
I was reading Object oriented programming using c++ by Ira Pohl, when I came across following piece of code. my_string& operator+(const my_string& a, cons...
[7 replies] Last: Thanks guys for clarifying this piece of code. @guestgulkan Than... (by robezy)
by wincry
How to convert a vc++ lib into borland compatible file
 
Hi Everybody plz can anyone tell me how to convert a Microsoft Visual C++ .lib file into Borland compatible files. I need to convert glut lib into borland ...
[1 reply] : Here friends i got it just use the implib utlit... (by wincry)
Looping a certain piece of code?
 
Ok what I want to know how to do is, How to make a loop so as if the goblin isn't out of hp, You keep attacking the goblin untill it is entirely gone. So...any ...
[3 replies] Last: Ah thanks for the explaination, I'll give it a go, And see what comes ... (by Nekrolysis)
Vector back function
 
Hi my question is very easy. // vector::back #include <iostream> #include <vector> using namespace std; int main () { vector<int> myvector; m...
[2 replies] Last: mmmm.i understand now.thank you (by areyoupp)
by meesa
C++ Using enum
 
Okay, so I'm a bith confused on how to do this. My program syntax is as follows. User enters a string String is validated for correct characters After eac...
[9 replies] Last: Well, I would only need to go as high as 155, but still, that seems li... (by meesa)
by luq
[solved] Linking psapi.h
 
Hi, I'm currently making a function to check whether a process is running, but somehow I can't include psapi.h. I'm using the newest release of code::blocks,...
[3 replies] Last: Hooray, I've managed to include psapi.h, problem solved. (by luq)
September 2009 Pages: 1... 45678... 23
  Archived months: [aug2009] [oct2009]

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