Beginners - January 2010 (Page 8)

While loop
 
I am trying to write my first while loop. It's supposed to start with a Celsius temperature of 100, then calculate the Fahrenheit equivalent, then subtract one ...
[5 replies] Last: Oh my gosh, that worked. Thank you thank you thank you, Bazzy!!! (by okapishomapi)
by j3tt
using struct
 
// Demonstrating a student struct #include "stdafx.h" #include <iostream> using namespace std; struct student { int creditHours; double gradeP...
[2 replies] Last: oops. hee hee. how embarassing. (by j3tt)
search/replace user string project
 
Hello all, Need some help writing a simple search and replace program for class. It's supposed to work like the search in replace in a simple text editor. D...
[1 reply] : I don't know how much this is over your head, I assume you know the ba... (by R0mai)
Getting a compiler
 
ok i got net beans IDE and the but now it says i need a compiler. I am working on an aplle computer believe linux and just curious what i have to do. basic step...
[11 replies] Last: For mac: Xcode http://developer.apple.com/tools/xcode/ (by closed account z05DSL3A)
Why does this work w/out header files? (1,2)
 
Wondering why this works w/out header files. I just finished it and commented out some of the header files and it still works in DEVC++. Why don't I need these ...
[24 replies] Last: Well I solved my own problem eventually. I had a problem with the arra... (by brentsid)
by kk84
How to return an array?
 
Hi all, how do I declare an array of functions like I want to return an array from my function For example char h (char k, int y) The above wont wor...
[2 replies] Last: You can't return an array, you can return a pointer to an array. But b... (by R0mai)
Using Arrays Function Having problem completing it.
 
#include <iostream.h> int main() { int grade ,sum=0,average=0,max=0; int min=0; for (int i=0;i<10;i++) { cout<<"Enter grade"<<(i+1)<<" "; cin>>grade...
[5 replies] Last: what is that garbage nikki17 ? don't post crap with the intention to h... (by gcampton)
Program won't pause
 
Hi, I am writing a program as an assignment for a class, and anyways I've always just used the code I put below to pause my program. cin.ignore (); ...
[14 replies] Last: your welcome. Did you figure out why the file was not opening? (by gcampton)
Class question
 
#include<iostream> #include<string> using namespace std; class fish { public : fish(string name); ...
[14 replies] Last: Well actually, Game Software Development is my major and I'm just gett... (by yoked88)
Output
 
I am at my first running program implementing structs, I am stuck on syntax errors in printing my values, any help out there? #include <iostream> #includ...
[9 replies] Last: Ah...I see what is happening, thank you blackcoder41. Don't know why ... (by yoked88)
class name into char
 
Hi, I don't think i know enough C++ to solve the following problem: I call a class: States eiStates(coef1,space); this class outputs into a txt file. i...
[5 replies] Last: Is putting the variable in a macro really any easier than just putting... (by Disch)
Anything other than system("pause");?
 
I am trying to do this; #include <iostream> int main() { std::cout << "Hello World..." << std::endl; //Text Below Dis...
[18 replies] Last: cin.ignore(numeric_limits<streamsize>::max(), '\n') That is the rig... (by tummychow)
specify where to create a text file?
 
OK, I know how to create a text file, but it always creates the file in the same derectory where the program is. How do i change that? like howabout saving a t...
[2 replies] Last: also the root slash "/" if using linux is where you start. fstream... (by brokenbot)
What's wrong with my code?
 
I made a program to calculate powers. The program just stops running after counter is initialized. I have to force quit it through the exit button. Why is doing...
[14 replies] Last: Somebody clearly hasn't done differentiation/integration! (by mcleano)
a question from C++ primer . about Dynamically Allocated Arrays
 
c++ primer says: // C-style character string implementation const char *pc = "a very long literal string"; const size_t len = strlen(pc +1); // space to allo...
[10 replies] Last: I checked the C++ primer book and hzesen1221 has copied the code th... (by moorecm)
i want this answer rapidly plz (1,2)
 
recursive function retrns number of digits in any integer 9325------->4 i want acomplete code plz for example 9325 should return 4
[24 replies] Last: int num_digits_helper( int num ) { return num ? 1 + num_digits... (by jsmith)
by mozly
Sleep: identifier not found
 
So I recently switched from c to c++ and I was trying to code a game of mash. Everything compiles properly except It says 'Sleep': identifier not found. Her...
[6 replies] Last: http://www.cplusplus.com/forum/unices/10491/#msg49054 You can subst... (by Duthomhas)
"&" Operator confusion
 
As I see in some code having something like " ClassName & ". For example: // this demo // check if a parameter passed to a member function is the obje...
[2 replies] Last: Thank R0mai! I got it. (by chaienbungbu)
by qon
why does unhandled domain_error from sqrt() not cause a terminate?
 
Hi, I have a question: why does unhandled domain_error from sqrt() not cause a terminate? for a example: void main(){ std::sqrt(-2); // Will not ca...
[2 replies] Last: Ok, from http://www.cplusplus.com/reference/clibrary/cmath/sqrt/ : ... (by qon)
How to print in c++
 
I have been searching around on the web for a long time and can't find out how to print using c++. Although there are some pages explaining how to do this, but ...
[5 replies] Last: ive posted it in another forum section, and if you do happen to find s... (by matt1234567890)
January 2010 Pages: 1... 678910... 24
  Archived months: [dec2009] [feb2010]

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