Beginners - November 2009 (Page 11)

How does the index increment?
 
I have a question about the program below. The index is set to 0 right? As c is being incremented, what happens to index. As far as i can see, it remains 0. So ...
[2 replies] Last: Thanks a bunch!!! I think i get it now! (by butterflyze)
by rkh795
getline won't recognize first character
 
Hey there, This is my first posting on these forums. Thank you in advance for your time. Here is the code I am working with, isolated std::cout...
[3 replies] Last: Don't worry about it. ^_^ (by firedraco)
by j3tt
Using functions to display a Grade
 
I understand the concept of the function being declared globally and locally and the calling of the function but I think I'm just missing some kind of syntax er...
[11 replies] Last: Your loop is waiting for 'score' to be less than zero, but you never c... (by JivanAmara)
Right shift
 
I need to make a program that shifts the contents of my array one space to the right so {1,2,3,4,5} goes to {5,1,2,3,4}. I'm not sure where I would start
[9 replies] Last: Wouldn't it be better to write a function that rotates the array any n... (by kempofighter)
What is this for?
 
I don't know what is \n in the end of the sentence in cout ... for example cout << "FIRE!\n"; I don't use it and I wanna know if it is something useful for pr...
[2 replies] Last: It results in a carriage return carriage return is \r, \n is a line... (by Bazzy)
Triangle recursion
 
I am making a program that outputs * in the form of a triangle. I need it to do the triangle right way up and then downwards. For example if it is 5 it looks li...
[2 replies] Last: Great thank you I will go and try that! It is homework for a class I n... (by spazamatic2)
How can I do this?
 
Hi everybody, I'm new to this forum and I don't really know to much from c programming. So,I have this code below : #include<iostream> #include<cmath> #i...
[2 replies] Last: Use a loop. you can read about loops http://cplusplus.com/doc/tutorial... (by kenshee)
recursive factorial
 
#include <iostream.h> int factorial(int); void main(void) { int number; cout << "Please enter a positive integer: "; cin >> number; if (number...
[7 replies] Last: It would be great if some of you are willing to tell me as I don't hav... (by kenryuakuma)
by Abebe
C or C++ ?
 
Cant C do anything C++ can?
[1 reply] : You can do the same things on both languages but with C you don't have... (by Bazzy)
Simpsons Rule problem, need advice on fixing a few errors:
 
/* 1. Write a program that uses either the trapezoidal rule or Simpson's Rule to estimate the value of the integral of the function f(x) = (1 + x^2)^2 over...
[3 replies] Last: Look at setw() to set the field width. (by jsmith)
difference between if and while statements
 
Can somebody tell me the basic difference btween if and while statements????????????
[2 replies] Last: thanx 4 replying bro (by Maisam Tamar)
Array / Pass by reference question
 
I am having problem figuring what my next step should be concerning this program I am writing. I am trying to write a program that using "pass by reference" to ...
[2 replies] Last: dont post multiple times please.. you have got reply to your other pos... (by writetonsharma)
Can someone clean my array code? Won't run
 
I made a program that reads in20 numbers, each between 10 to 100 and if a user inputs a number not in that range they are asked to re-input. After reading in al...
[2 replies] Last: line 13: cin << num; should be, cin >> num. As mentioned above rea... (by cotherman)
Programming with Qt Creator
 
Hello! Id like to use the Qt Creator IDE but when i create a new project i can only create a qt project. Has anybody experience with this IDE and could tell ...
[5 replies] Last: kdevelop is good too.. :D (by writetonsharma)
by one nz
Compilers for vista
 
I know this must have been asked an 1,000,000 times but I cannot find a compiler that will work for me (see the problem with my old compiler at http://www.cplus...
[2 replies] Last: Visual C++ 2008 Express Edition. You could even try the beta of Vis... (by closed account z05DSL3A)
String to Double
 
3.459583967924D-05 I have this number above stored in a text file. I extract the value in a string and convert it to a double value and get the number below....
[4 replies] Last: oh em gee, you stole my name :P (by gcampton)
breaking up cpp files / and sourcePage errors
 
I'm trying to work out how to break up my assignment, I know how to break into 3, as per usual main.cpp driver.cpp and header, but what if I want to add more .c...
[8 replies] Last: if ... I could actually get something to work :( I don't get it, I ... (by gcampton)
Unknown error
 
I am getting an error I do not know how to fix Here is my code #include<iostream> #include<vector> #include<fstream> #include<cstdlib> #include<string> #...
[5 replies] Last: I do see what you mean though bazzy so I just moved it into the main f... (by cbouwkamp)
by pmitas
cout behaves weirdly - prints elements last-to-first
 
As an assignment for my beginner C++ course I'm writing a stack that holds strings (char tables). It has an overloaded "operator const char*()" that should enab...
[3 replies] Last: Thanks for the quick reply ;) (by pmitas)
Dynamic Arrays
 
I am so confused here, I need to make a program that I have four computer labs. Lab 1 has 1-5 stations Lab 2 has 1-6 stations Lab 3 has 1-4 stations Lab 4 h...
[1 reply] : Happy reading: http://www.cplusplus.com/doc/tutorial/dynamic/ (by mcleano)
November 2009 Pages: 1... 910111213... 25
  Archived months: [oct2009] [dec2009]

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