General C++ Programming - April 2013 (Page 23)

by Nonlin
Find Frequency (string into Struct Array)?
 
I'm trying to figure out the word frequency of a user inserted string. I've tried doing it via getline of the struct array and via the getline of the string w...
[5 replies] Last: Saddly can't use sstream or any other include other than string and I'... (by Nonlin)
by fefer
input text file help needed
 
My program needs to read data from a text file. The first line of data contains correct answers for a test, the rest of the data contains student id's and their...
[no replies]
STL regex to match multiple substrings
 
Hi, I am using the (fairly) new STL implementation, which I just became aware of, of regexes. Seems to be an implementation of boost::regex ;) Anyway, I have...
[2 replies] Last: Ok,that should work! Thanks! :) (by hansaaa)
by wk0109
how to search second record from text file
 
#include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); cout<<"Enter N...
[no replies]
error in test.cpp file
 
helo all i implemented a header file for doing the fixedpoint arthimethic operations, which is shown below #ifndef __fixed_point_header_h__ #define __fix...
[14 replies] Last: In (( fixed_ / (divisor.fixed_ & (power2<F>::value-1)) )<< F ) W... (by JLBorges)
help with arrays / substrings?
 
i'm working on a project for school where i have a file in the format: string double,double,double,double,double,double,double double,double,double,double,doubl...
[10 replies] Last: thanks for this useful information.... i need this type of help.... (by Beverlycen)
Need Help IN C++
 
Hello Guys Im 14 and i really want to learn C++ Programing as part of my future job And I was wondering If Anyone can tutor me over skype for FREE Because i hav...
[13 replies] Last: Well im in central time so im in school from 7:30am to 3:35pm i don't ... (by Dirtymonkeysk8r)
map, begin() method example
 
In this article, http://www.cplusplus.com/reference/map/map/begin/ the iterator returned by std::map::begin() is beeing incremented before the first use. ...
[2 replies] Last: the iterator returned by std::map::begin() is beeing incremented befo... (by MikeyBoy)
by eastw
How To Edit File
 
Hi Everyone, Well,I have a dat file which following format; ID Level(Manager or Executive) Name Sales(for 12months) For example; W00051 M Lee Ah Moi ...
[5 replies] Last: I assume that you would use C++ and std::library typedef struct leve... (by writetonsharma)
by Phiru
Network game.. how to move?
 
I will try to make a simple game(GUI) with network. And My first test will be to move an object from x1 toward x2. this is an example. CharacterObj.x1...
[1 reply] : sendData( CharacterObj.x1 + 10 ); (by Fransje)
code into function and stopping a loop
 
Hi! I have exactly two problems with my program. I need it to stop at the end of file but have it go up to 15 if needed. Also I need to use a boolean function t...
[1 reply] : - You can put the whole thing in a loop. If you need to go up, just st... (by writetonsharma)
Doing this without goto
 
Everybody says that goto is notorious to being obsecure So I want to clean my code from having this goto so how do I do that ? void function( MyClass ...
[3 replies] Last: I mean that most of the time goto make simple things looks difficult ... (by rmxhaha)
NEED HELP
 
please help me with my project CS2432 – OBJECT ORIENTED PROGRAMMIN (OOP) Mini Project – Flight Information Display System Design and write a program ...
[4 replies] Last: cplusplus (by rethabile)
by Durden
Multiplication of complex numbers
 
I am trying trying to write a class that can multiply complex numbers but without overloading operators Any help would be much appreciated
[1 reply] : class complex { private: double Re, Im; /*...*/ public: void ... (by MiiNiPaa)
Why not?
 
In my book: "You cannot initialize the static data member in the class definition — that’s simply a blueprint for an object and initializing values for mem...
[2 replies] Last: Your edit is spot on (by Smac89)
Text Editor / AI
 
HELP! // Editor.cpp : Defines the entry point for the console application. /* // Add these includes into stdafx.h #include <iostream> #include <fstream> #i...
[8 replies] Last: I also need help with vectors. I know this is spaghetti code, but plea... (by kiknwing11)
Tic tac toe, small problem.
 
Hello Everyone I am new to the forum,i have a simple code, everything works and goes fine. i just got stuck on a small detail. The program is called tic tac t...
[1 reply] : I once had trouble with this myself. You have this: if (winner == 'X... (by Angelus1609)
Game assignement trouble updating life
 
arme() int Personnage::arme(Personnage *pCible) { srand(time(NULL)); if( this->bArme() == true) { int iRand = rand() % (this->m_ptArme->geti...
[3 replies] Last: I've corrected this problem by outputing the result in the function wh... (by bluespeed30)
by Alex91
Validation functions (1,2)
 
I'm writing a program to check whether codes from a file are invalid, valid, inactive, or valid and active, but can't get it to work properly. The invalid codes...
[22 replies] Last: I guess the if statement doesn't continue to evaluate like the while s... (by Alex91)
Array (multi-dimensional ?) matrix brain-fart.
 
I seem to be brain-farting today. I have an array matrix I'm trying to implement and could use some advice, please. Here's basically an example of data I have...
[8 replies] Last: As an aside, in the long run I find it simpler to treat 1D arrays as m... (by Ikaron)
April 2013 Pages: 1... 2122232425... 53
  Archived months: [mar2013] [may2013]

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