Beginners - October 2010 (Page 3)

by vlad61
Lets CsomeMath
 
Hello. I am trying to add a #include<cmath> code but apparentlly it wont work internally?? My program runs fine but but as soon as I add that code in there it...
[3 replies] Last: I placed it in the wrong zone. Thanks guys! Sorry aboutt he waste of i... (by vlad61)
functions
 
please how do i go about calling in between functions without using goto........for example if i have done some codings and after operation i want to ask if the...
[7 replies] Last: @Frank : Do you mean The Statement Thank you playing this game is pr... (by lucifier)
Get individual numbers from int
 
Hey guys, i'm writing a small math app and i need a little help. let's say i saved a users input into a variable (int), and i wanna get the individual number...
[2 replies] Last: Awesome, i hoped there were some math trick like that :D Thank you... (by ShadowRayz)
call functions
 
Please i am new to C++ and need to understand basics....i have got a major assignment that would bee needing handing in by next week and still having problems o...
[1 reply] : If you have a function float psquare (float a){ return 4*a; } ... (by hamsterman)
Two-dimensional bool matrix.
 
Hello, First of all, I'd like to say that I have very little experience in C++. I've done basic programming in several similar languages, but once Pointers c...
[3 replies] Last: You could write a function that generates and returns a row or column ... (by hamsterman)
while loop, for loop and repeat loops
 
count from 0 to 200(in steps of 10) using while, for and repeat loops (write three separate programs.
[3 replies] Last: thank u so much for your help... (by shattarodger)
by hogs11
2d Array Problems
 
I am trying to write a connect four game but I cant get the check for winner fuctions to work just right. Everything else is good to go. When I compile and run...
[1 reply] : Plss use code tags to post code !! The 1st problem is that 'int Com... (by Raggers)
How to Date Validation
 
/* * book.cpp * *Simple program for storing array of book titles and published dates * * Created on: Oct 9, 2010 * Author: Alpha */ #includ...
[1 reply] : Firstly you make 2 lists of books here. One will have the dates and on... (by Raggers)
Initializer
 
I have not a lot of experience with C++. So far I did everything in one file. Now I tried to use 2 source files and 1 header. I get the message that an initial...
[11 replies] Last: As I was saying, the file names don't matter as long as your #includes... (by Raggers)
Deleting a Pointer to an array.
 
Hi all! I've probably got a dumb question, but I can't seem to find any direct refrences to my subject when I search for it. I'm trying to figure out how ...
[4 replies] Last: Ok. Thanks Athar! (by jamesmk)
by gibran
My program by passes 'cin'
 
//i am stuck on something that i would think i should be able to figure, out but i cant I am able to input the first part,mom's name, but the program bypasse...
[4 replies] Last: Thank you to all. My Problem is fixed. (by gibran)
by brad82
Using Char with multiple strings and constants
 
Hi all, Im starting to get the hang of C++ (finally understood pointers :D) but one thing I just cannot work out is Char arrays. Say I want to create a ar...
[13 replies] Last: I mean that is works as long as you know the memory location will not ... (by Raggers)
by firix
conversion Error?
 
Why this code returns en error ? struct X { int i; X(int in) { cout << "converting int " << in << " to X\n"; i = in; } ...
[3 replies] Last: You have an ambiguous overload, meaning that when you call ret = y + 1... (by Raggers)
return a local reference
 
Hi, I'm not new to C++, been programming in it for years but I cam across something today I'd never tried. I was messing around with a library I wrote to ...
[5 replies] Last: Ya, that's what I was thinking too. I was just wondering if I was wro... (by Raggers)
Get a Word From a Pointer
 
Given a string (or a char* pointing to the first letter), is it possible to return the whole word, knowing the length? I cannot edit the .h file. The functio...
[3 replies] Last: The private member variables were declared in Words.h. In Words.cpp yo... (by hamsterman)
Reducing my list of if loops
 
To put it bluntly I need help. The large number of variables is the only way that I can get the function to work. I don't know how to reduce them to the point w...
[2 replies] Last: If loops? I never heard that term before ;o) Your ifs arn't looking... (by Galik)
Reducing my list of if loops
 
To put it bluntly I need help. The large number of variables is the only way that I can get the function to work. I don't know how to reduce them to the point w...
[2 replies] Last: You need to learn about arrays. // very bad void func(int& v1... (by Disch)
ofstream append?
 
First I'll show you a simplified version of the code I'm looking at. std::ofstream output; output.exceptions(std::ios_base::badbit | std::ios_base::failb...
[4 replies] Last: Thank you for the help Desh - that cleared up a lot. As an aside: T... (by ricomoss)
Switch Issues
 
I have been having some issues with my switch loop. All the code that precedes it runs perfectly. But when i get to the point where i need to input an opt...
[3 replies] Last: This is like some unholy C/C++/nonstandard mashup. A few tips: 1... (by Disch)
Queues, adding and deleting elements
 
Hello all, I have a quiz regarding queues tomorrow and am still questions the notation for a given addElement & deleteElement function. I understand the conce...
[5 replies] Last: It's not a problem. So, if rear == front == -1 (not C++ expression!... (by jsmith)
October 2010 Pages: 12345... 42
  Archived months: [sep2010] [nov2010]

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