Beginners - October 2012 (Page 81)

Static Const Members of a Cpp File
 
First let me apologize for the title; I've looked up my problem and I think the reason I couldn't find an answer is my not knowing what the correct terms are. ...
[no replies]
for(;0;) --> HELP!!
 
Hi, i am Paras, class XI. I just started learning c++. Yesterday, i was using c++ and found that my for loop was behaving like an exit controlled loop. I enter...
[9 replies] Last: int a; for(a=0;a<10;a++) ; //null statement is exactl... (by TheIdeasMan)
Infinitely looping a certain piece of my program
 
Hi I am trying to write a program that requires a repeat to infinity. However I am not sure how to do this I am trying to use the Taylor series to find the sine...
[1 reply] : while (true){ when you use this syntax, you need to include a break;... (by pogrady)
Help! illegal escape sequence issue
 
Hi, I'm new to this forum and I need help on an assignment due by midnight. I'm trying to put the value returned by str.at(5) in quotes like this: 'r' but I ke...
[2 replies] Last: Thanks so much!! I appreciate it! The only thing I had to change was ... (by markz2012)
by Ch1156
Vector help
 
Ok so in my program i have a vector that outputs the inmate names, its supposed to output 10 or 11 random names but there all the same, why? i dont get compiler...
[4 replies] Last: bump (by Ch1156)
by Ch1156
Random names using an array
 
Im currently using a switch statement for the names but i think an array would be easier but how to i get the program to randomly get a name from the array: ...
[9 replies] Last: Do not call srand before every call to rand. Only call srand once at ... (by Disch)
input file help
 
I have an input file that I'm trying to input data from as int, string, and doubles. The data file is in the format: John Doe Best book ever 97.54 4 (ai...
[4 replies] Last: is there another way to input int or double using getline? I've been s... (by MajMinor)
How to read and store multiple input divided by whitespace to the same variable? Is it possible?
 
This is what I have so far.. #include "Menu.h" #include <iostream> #include <fstream> #include <string> using namespace std; class Menu { privat...
[no replies]
by Howlz
Number of occurence of each alphabet in a user inputted string.
 
Firstly I am a first timer noob at programming so a sample program or the below program with your edits and tweaks would be awesomely helpful. Thank you. I wan...
[5 replies] Last: Thanks but it doesn't still give me the occurence of the rest of the a... (by Howlz)
need help with a few homework problems
 
The output produced by the following statement: ______ cout << left << setw(6) << "X:" << setprecision(3) << right << setw(7) << 1.2345 << ':';...
[2 replies] Last: thanks man you helped alot. and on the third one that is exactly what ... (by byronflds)
by jc4bs
Declaring a variable as a letter or word
 
Hello everyone. I'm having this problem which I just cannot seem to find the answer to anywhere. I need to declare a variable as a letter or word using an if-e...
[2 replies] Last: It is not a declaration. It is an assignment. int x = 10; std::stri... (by vlad from moscow)
What am I doing wrong?
 
Ok, the program itself works fine. Compiles fine, runs fine. But I need it to make the char choice uppercase, and I need it to delay or wait for user input befo...
[2 replies] Last: Thank you for your help! I don't have a C++ compiler here, but I'll ma... (by Xethaios)
entering a string of data to an ofstream file
 
I am trying to create a program that allows the user to do 2 things (create a new file in the current directory, or search a file and display the word count) Th...
[3 replies] Last: nvr mind I got it with cin.ignore() :) ty very much (by primecodz)
by Snipez
Help needed please - Starting project.
 
Hi guys. I would like to ask your advice on a few things. It would be really helpful if you could answer any of my questions. This is all using Quincy 2005, FLT...
[2 replies] Last: I think FLTK is required due to the demonstrators in third year comput... (by Snipez)
by Owain
Class vs Struct
 
Hi. Just curious about the difference between classes and structures. I know that class members are default private and struct members are default public. Is th...
[2 replies] Last: There's 1 small difference: base classes are public, too. Other than t... (by closed account zb0S216C)
How to compile this vector?
 
I'm trying to create an inventory and need this kind of vector: #include <iostream> #include <vector> using namespace std; int main() { // FOOD I...
[4 replies] Last: Your version of GCC is too old to be able to do that. Initialize Bread... (by Peter87)
Printing
 
I was trying to figure out how to print a series of lines at a set measurement. ex. 20 lines at 4.0123 inches. Anyone with some information that would help ge...
[1 reply] : This would depend on the size of your screen which I'm fairly sure is ... (by Stewbond)
error in my function
 
Hi I am relatively new beginner. I am trying to write a function that outputs the first and last digits of a number and also the total number digits of a number...
[4 replies] Last: oh wait, I thought total number was the sum of all the digits in the n... (by Fransje)
Output within a for loop rectangle
 
Hey guys this is my very first post here looks like a nice site,it helped me a bit when doing my project.anyway my problem is that i have created a rectangle or...
[6 replies] Last: Try making your own print function: #include <iomanip> #include <ios... (by Stewbond)
Calculator program help please?
 
Ok, so I am writing a calculator program for class, but I keep getting an error that says: Calculator.cpp: In function 'int main()': Calculator.cpp:40: err...
[3 replies] Last: Oh crap, thanks guys, haha. My bad (by noylekul)
October 2012 Pages: 1... 798081828384
  Archived months: [sep2012] [nov2012]

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