Beginners - September 2011 (Page 29)

removing blank lines from a file
 
i read in a text file and saved it as "file" i now want to remove all the blank lines from "file". number of lines in file Replace all asterisks ('*') wit...
[1 reply] : First check if a string is blank or not (get one line into a string us... (by Nisheeth)
Help roman numeral program multi-character character constant
 
Here is my code i want to get rid of the warnings #include <iostream> #include <fstream> #include <string> using namespace std; int main() { int r=1223; in...
[3 replies] Last: I'm a beginner too :). But I tried your program with my fix and get an... (by yazu)
compiler error
 
Hi, I'm trying to learn C++ by myself and I'm new to programming. I am getting compiler error and don't know how to solve it. I would be grateful if somebody c...
[2 replies] Last: Thanks CodeMonkey (by mitosis)
SOME ASSISTANT please ^_^ I need help with a Dual if statement
 
Hey guys this is my first post, I've tried figuring this out myself, but I'am really stuck. I'm new to programing so this may be an easy solution. I am tr...
[10 replies] Last: As a side note, you can do this in one combined statement. I know it i... (by Nisheeth)
I want to know how to invert a string in Dev C++
 
Can anybody show and teach me one?
[3 replies] Last: Probably not, but I wouldn't post a solution that could be handed in a... (by Athar)
by jcc
IM new and a little bit confused in variable in class
 
HI im programmer but shifting now to c++ I'm in the process of learning how c++ object works and im a little bit confused for some variable declaration ...
[2 replies] Last: HI, thanks for a bright explanation.. (by jcc)
by matt89
Datebase into single text files
 
Hi I have been learning C for 2 weeks now and I know basics. I want to make program which loads 2 text files. Article name would be output filename "Article 1....
[no replies]
Copy Constructor and copy assignment operator
 
Hello everyone! Can somebody explain the functionality of the Copy Constructor and copy assignment operator? Its way too short in the Tutorial on this sit...
[11 replies] Last: thank you everyone! you all were a great help for me ^_^ (by schowadala)
Segmentation fault on function call
 
when i call extraleft() in main() it shows me segmentation fault, the code is given below #include <cstdio> #include <iostream> #include <cstring> #inc...
[1 reply] : I can't see anything obvious. What do you enter when it happens? Is t... (by coder777)
Inverting words in sentence
 
Hello! I want to make program which inverts the words in sentence, but not the sentence itself. For example, if I type "I love c plus plus." I program to print...
[4 replies] Last: 1) Store the words in an array/vector (I would go with vector), in ord... (by Cuddlebuddie928)
by Kahiko
Naming variables and classes
 
I have such a big problem naming my variables and classes that i spend more time thinking about how to name them then programming actual code or debugging it. T...
[5 replies] Last: I agree with Mathhead200, all variable names consisting of multiple wo... (by zippyking)
by boston
More payroll...
 
Hi all, Sorry to be a nuisance, I find that I learn more from you than from my text (professor doesn't teach, respond to emails or grade assignments). I h...
[12 replies] Last: ( Oh god, DevC++! Look up gcc, or if your using Windows, Visual Studi... (by Mathhead200)
by hannjo
How to create this program
 
This is my first semester of college and I got put into "Intro to Programming Principles using C++". and.... I have no idea whatsoever what is going on in this ...
[10 replies] Last: [quote=hannjo]For each of the following, write the C++ statement to pe... (by Mathhead200)
do while + while = hang?
 
Hi.. can someone help me out? is it possible to have a while loop within a do..while loop? because i have one in my program now and it hangs when its time to do...
[8 replies] Last: Thank you! that finally got me out of the loop.. but sadly, its still ... (by sleet65)
Create iterators with a cycle
 
Hi, i want to create several iterators with a cycle, in this case a "for". For example, i have a vector of "n" size and what i want to do is create an iterat...
[2 replies] Last: +1 to helios, and I must say that vectors use random access iterators,... (by webJose)
read file into matrix
 
I need to read two matrices (A&B) from a file, do calculations, and output the result (C) into a new file. I do not know beforehand the size of the matrices, bu...
[4 replies] Last: Thank you for your advice. If you're curious... I was hesitant to use... (by procras)
Roll the Dice (keep getting 6)
 
I'm trying to simulate rolling a dice, but every time the "random" number is 6. What am I doing wrong? Please help! This is what I have: #include <iostr...
[3 replies] Last: heres what i use to get random numbers: long rndnum(long lwoest,... (by Daniel Spain)
by vizard
string help
 
how do i include all the string commands and members like string::size_type without having to write the entire thing (string::size_type) everytime i use it?
[1 reply] : You...don't? Either that or typedef it. I'm not really sure what you a... (by firedraco)
<< Help please.
 
Hi everyone, I want to write a code where example: char ch; if (ch == '/*') // ignore until the other '*/' if (ch == '//') // ignore until the '...
[3 replies] Last: No i am not trying to build a parses (by detroit)
help with assignment please
 
Hello everyone I am enrolled in a beginners C++ class and have some doubts about some questions in a take home exam, please I need help. the declaration int ...
[1 reply] : [quote=facundokpo24]I think the answer is B (sic) Yes, the answer is ... (by closed account zb0S216C)
September 2011 Pages: 1... 2728293031... 48
  Archived months: [aug2011] [oct2011]

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