Beginners - July 2012 (Page 43)

Counting characters, then output total
 
I'm writing a program that counts characters from a file, and outputs the answer to the screen. I've got some code, but I'm really confused on getting the answe...
[3 replies] Last: Here are the instructions, verbatim: Write a program to read a file ca... (by C Minus Minus)
by dubleD
Xcode (c++) into terminal
 
Sorry, this is a repost, but I just can't seem to figure this out. I'm currently running a program through the terminal, and making commands to this program ...
[5 replies] Last: yeah, I can't look at the code right now but if I remember correctly i... (by dubleD)
RETURN SUCCESS VS RETURN 0
 
As in the title, what is the difference between RETURN SUCCESS and RETURN 0? Thanks. Bosco
[17 replies] Last: Or than return not success; xP return ERROR_SUCCESS; ... ¿what?... (by ne555)
Interrupting XP load sequence
 
Hi, I am fairly new to C++ and I was just wondering if there was any way to interrupt the XP loading sequence to start up a console program instead of the welco...
[2 replies] Last: Basically, yes. But... I only want the console application. The only... (by PoddyCo)
Splitting a String.
 
--
[2 replies] Last: stringstreams are handy for extracting numerics out of strings: #inc... (by Texan40)
Set & Get methods
 
#include <iostream> #include <string> using namespace std; class books{ public: void setName(string name){ name = The New Particle; } string getName(){ retur...
[1 reply] : Your example is invalid because it will not be compiled. Nevertheless... (by vlad from moscow)
Absolute value function?
 
I am writing a program to a number closest to 100 from a list of numbers. I am not familiar with the syntax. Would I declare int=x, and x (abs=100)?
[7 replies] Last: My congratulations! I think C Plus Plus and C Minus Minus will give C ... (by vlad from moscow)
C++ endl
 
I am using endl to put an \n character on the output stream, like this: cout << endl << "SOME TEXT HERE" << endl; There are times when this produces more ...
[1 reply] : I think that it may be because you output something as cout << "Some ... (by vlad from moscow)
Help about my error
 
Sory for my bad english, but i'm new in c++ and i read few book and make samo code! So! My class is: class Monster { public: Monster(int hp, in...
[9 replies] Last: OMG!!! i fixed my code!! :) While i update my last project i forgot t... (by stefkoff)
Practice Problem Help
 
Im doing the beginner practice problems from this site. Im doing the arrays. I did all of it but need help doing the four star part. I can get the list from gre...
[1 reply] : you did not state the problem clearly (by Script Coder)
pure virtual function query
 
if my interface header is like this: class MyMathFuncs { public: // Returns a + b virtual double Add(double a, double b)=0; ...
[3 replies] Last: +1 @ vlad. virtual functions cannot be static. A virtual function ... (by Disch)
size_type VS size_t VS int
 
Dear guys, I come across a book that declare something like queue<char>::size_type mismatches = 0; I don't quite get it, why not just say int mismatches =...
[5 replies] Last: the size_type is a declaration inside the class template queue<T>. You... (by vlad from moscow)
input manipulation
 
Hello, I am having trouble converting a text file into pig latin. I managed to store the file into a vector of strings, and attach the word "way" to the end ...
[2 replies] Last: hey fg109 thanks for the code, it worked, but I decided to forgo the v... (by hitholdir)
replacing a character in a string but doing it inline?
 
I have a series of lines of code, all that have one value that I need to replace with an integer variable. I know there's strcat, or sprintf, but what I'd like...
[10 replies] Last: Write the following way XPLMFindDataRef(("sim/weather/cloud_type["+st... (by vlad from moscow)
problem
 
Im a beginner. What is wrong? --------------------------------------------- #include <iostream> using namespace std; int main() { char Abfrage; ...
[2 replies] Last: Also you can substitute these statements if (Abfrage == 'A') { co... (by vlad from moscow)
by tatai
shorting data in C++
 
I have a text file with 100 years of data (1900 - 2000). each year is having 365 or 366 entry depending on leap year or not. I want to store the data of each ye...
[13 replies] Last: Oh, you mean SORT! Not short! Ok, let me explain you. Create a string.... (by S G H)
by beakie
Charles petzoid for linux/mac
 
Windows programming 5th edition. Is there something similar?
[3 replies] Last: For Mac (Objective-C): http://www.bignerdranch.com/books (by closed account z05DSL3A)
When to use std::string in the place of a cstring
 
the c++ string is extremely user friendly and has a ton of helpful functions, but for the most part my book elaborates on the cstring. When will using a cstring...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/20856/ ^ Would cstring only be... (by strongdrink)
using fstream
 
Hey Guys, I need help rewriting this code in a better way with fstream //opening the Records file Records = fopen("Records.txt","a+"); do { ...
[1 reply] : http://www.cplusplus.com/reference/iostream/ifstream/ifstream/ (by shadow123)
Problem with Doubly Linked List
 
Hello All, I am facing a issue with a doubly linked list. My code is #include<iostream> using namespace std; void addNode(int); void displayListFor...
[8 replies] Last: Found the culprit. Corrected Code: #include<iostream> using namesp... (by anubhavjain346)
July 2012 Pages: 1... 4142434445... 54
  Archived months: [jun2012] [aug2012]

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