General C++ Programming - May 2013 (Page 16)

write a small b before capital B in the file. This isn't easy.
 
Suppose my file a.txt has "ABC" written in it. Now I want to write a small b before capital B in the file. How will I do it. I've tried to do it but i'm having ...
[5 replies] Last: Thanks a lot JLBorges! (by Rehan FASTian)
Validating that there are no integers
 
I am working on a program where the person enters their name and their gross pay. I had to validate that the gross was a number and contained no letters. I ...
[4 replies] Last: Thank you for the help I do appreciate it. I get those results. The pr... (by gogobumrush)
[Help!] tic tac toe void function (1,2)
 
void newtable (char board ) { for(int n=0;n++;n<5) { if(n%2==0) board =(' ','|',' ','|',' '); else ...
[29 replies] Last: so i got it down to this void clearboard (char board ) { board = {... (by alen1234di)
Value define problem in class function
 
Hi, I have a class: class testa { public: int n; double s; void funca(); } void funca() { n = 500; s = 1.0/n; cout << s << endl; } The ...
[7 replies] Last: s inside funcb() is function local. You will got an error on line 20. ... (by MiiNiPaa)
HELP- not saving text to the specified location
 
Here's my code, my problem is that it is not sending the keystrokes to the LOG.TXT file I want them to be going to. What am I doing wrong? 1 #include ...
[no replies]
ostream/istream iterators
 
How can they be classified as iterators? http://en.wikipedia.org/wiki/Iterator The Wikipedia definition says: "In computer programming, an iterator is...
[4 replies] Last: Thanks guys! (by Anmol444)
HELP- [Error] 'fprintf' was not declared in this scope
 
I have this error- 'fprintf' was not declared in this scope (line 32) and this 'fclose' was not declared in this scope (line 33) here's my code...
[3 replies] Last: nevermind that was a stupid question...... (by I 8 Crayon)
Smart Pointers
 
When i try to compile this code it gives me a error during run-time saying "*program name* has stopped working" Code: #include <iostream> #include <memory> u...
[5 replies] Last: Oh ok thanks, that makes sense. So they can only point to dynamically ... (by Anmol444)
Please help! My program is not reading in values from a .DAT file correctly
 
Hey guys I'm really stumped on this problem I'm having in my lab. We are supposed to split this lab into 3 files a .h and 2 .cpp's. The code I'll be talking abo...
[1 reply] : This is my code from the previous lab we are supposed to build off of.... (by ovaltine99)
initialising arrays
 
How do you set all the entries in an array to 0 or a particular number... much appreciated
[3 replies] Last: Misc. other stuff: - For char arrays, you can also use const size_t... (by andywestken)
Help- expected unqualified-id before '{' token
 
here's my code, I get this error on line 16 expected unqualified-id before '{' token What am I doing wrong? 1 #include <iostream> 2 using names...
[2 replies] Last: Thanks you! (by I 8 Crayon)
Iterators
 
From my book: "Iterators are objects that behave like pointers and are very important for accessing the contents of all STL containers, except for those defi n...
[14 replies] Last: Alright thanks guys. One question about line 36 and 37. Why is the ar... (by Anmol444)
by jtsf
polymorphism
 
Can anyone can explain with example for polymorphism? the book says : polymorphism allows an object reference variable or an object pointer to reference ojec...
[1 reply] : http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 http:... (by MiiNiPaa)
by stx361
Encrypting for a school
 
So, I'm new, to this forum and to c++. Second, this is for a class, so I really don't want the answer, as I would like to learn the coding. if (m == 'e' |...
[5 replies] Last: Sorry for the slow reply, I appreciate you help. Thank you (by stx361)
arrays
 
Can someone explain to me about arrays and functions: I want to know everything and anything there is know about these two from how to declare, define, how to...
[1 reply] : http://www.cplusplus.com/doc/tutorial/arrays/ (by MiiNiPaa)
arrays and functions
 
Okay, im kinda new to this c++ program and all. One question is how do you make a 2D array(table) using arrays and functions eg: _ _____|______|_________...
[2 replies] Last: I've used a nested for loop to firstly create the table: but its not o... (by fnaqesa)
Classes with exception problem
 
I have a program that uses class functions to enter and print out info. The problem is with the second function answers(). Here is the whole cpp file. In the an...
[6 replies] Last: whew! thanks I read a little about runtime_error to understand it bett... (by Gawaine)
by Jebus
Help in working in Object Oriented so far.
 
Hello for the past few hours I've been working with object oriented,
[13 replies] Last: I will finish it by tomorrow, im too sleepy i cant think at all. THANK... (by Jebus)
by jtsf
this-> pointer
 
As I am a beginner, I confuse the difference between this-> usages. question 1. this-> is used in draw.h My understanding at draw constructor this-> is...
[7 replies] Last: Thks for all. I like to confirm that.. Question 1 this-> can be omitt... (by jtsf)
Comparators in STL
 
What exactly is a comparator in STL for containers? I see the term used in some places but I dont exactly understand what it means. Can anyone please expl...
[2 replies] Last: O alright thanks! (by Anmol444)
May 2013 Pages: 1... 1415161718... 47
  Archived months: [apr2013] [jun2013]

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