General C++ Programming - October 2011 (Page 33)

by Srija
Reading Files
 
Hi Everybody......... I am facing a problem with file handling... I have created a text document manually and given some name to that. i have placed this docu...
[1 reply] : Try while (myfile.getline (buffer,100)) { cout << buffer <<... (by sohguanh)
by peha
Email simulation using queues
 
Here is the assignment I get: ***** Write an email simulator that processes mail at an average of 40 messages per minute. As messages are received, they are p...
[4 replies] Last: The loops are not completely wrong, but they must be revamped so tha... (by coder777)
by ne555
using class (like with namespace)
 
I've got something like class foo{ public: typedef float value_type; typedef std::valarray<value_type> vector; private: vector w; }; In order to code its...
[no replies]
Trouble in ifstream reading structures
 
Hi everyone! I have the code below which works fairly awesomely until I try and save an array of the 'test' structure. What happens is the code outputs this ...
[6 replies] Last: Hey! I figured out how to make it work! Yay: #include <stdli... (by benchsketch)
Function calling with multiple parameters
 
Trying trying to figure out how I would call this bmi function under the MAIN. //BMI Calculator using function with return variable //Created by Ashish M...
[2 replies] Last: That helps! Thank you! (by Ashish Mishra)
Regex match at least one non-alpha char
 
I want to match "A1" or "A&B" but not "A". In other words, I want to match a contiguous range of chars that contains at least one non-alphabetic char. Here i...
[7 replies] Last: Thanks Duoas, that helps a lot! I was trying too hard to logically AND... (by Brian H)
Statistics Question
 
I'm writing a header file specialized for working with statistics. I'm a little rusty with my statistics information and was wondering if anyone would mind taki...
[2 replies] Last: Okay, sorry. I was in a rush, got school. I'll edit the first post wit... (by Nerdy314159265)
by barbis
Typedef where?
 
Hello! I am trying to convert my vc6 code to vc++ 2010. In http://msdn.microsoft.com/en-us/library/tsx7wabs%28VS.80%29.aspx it says that typenames has to ...
[8 replies] Last: Please try the SDK shipped together with GMS v2.0.2. It's for msvc90 (... (by inter1965)
Date format conversion
 
I need help with my assignment. This program is suppose to take in the date mm dd yyyy and convert it a date such as March 3rd, 1999 while using switch case s...
[6 replies] Last: Its working on my computer =/ (by pbdemon101)
Need help for this task !
 
My Beginning C++ teacher gave me this homework and I have no idea on how to solve it. Please somebody help me with the solution Write a C++ program to acc...
[no replies]
String exception
 
Hi guys! I am trying to make a game, but if the user inputs a string, i want to throw an exception. How can i make this exception of the string?
[2 replies] Last: If a user inputs a string like A or B or CC or..... The result should ... (by Donanza)
Sorting a file with names II
 
Im continuing on this for a lack of space. #include <iostream> #include <cstring> #include <iomanip> #include <string> using namespace std; const...
[3 replies] Last: You could post everything from this post as a reply in your first post... (by ModShop)
by majc
Error: must be initialized in constructor base/member initializer list
 
I did this code: .h file: private: hkpRigidBodyCinfo& m_bodyInfo; hkpCharacterRigidBodyCinfo& m_characterBodyInfo; public: OgreHavokBody(hkp...
[no replies]
Dire need of assistance
 
Okay, my teacher assigned my class to create a C++ program that reads in a postfix expression, create an expression tree (basically a series of nodes with 2 poi...
[1 reply] : Just an update, I think the problem is just adding another value to th... (by EonsNearby)
stringstream arrays problem
 
#include <sstream> #include <iostream> using namespace std; int main(){char a ="Hello",b =" World"; char chars ={a ,b }; string c,d; string strings ={c,d}; st...
[6 replies] Last: to me the code there is completely too complex for what it is trying t... (by Azagaros)
Please help me out.
 
I have an error on the following code. struct A { int *aA; }; int main() { ... ... A b ; // allocating memory b .aA = new int ...
[4 replies] Last: Sure. The allocations are fine, it's the assignment that's wrong. Here... (by closed account zb0S216C)
LED
 
I want to construct a program using c++, where i should write every single latin letter in a particular scale. This program should be constructed using Loop, Br...
[4 replies] Last: It's the kind of hw Svetla herself hasn't solved yet :s (by SecretMaster)
What is the problem of my program?
 
a basic problem which extract each word of a sentence and print it out. #include <iostream> #include <vector> #include <string> #include <cctype> //usin...
[4 replies] Last: thanks! (by northfly)
by isnork
Static and mutable data type.
 
Hi, I was wondering, can a class attribute be static and mutable? For example, typedef tbb::queing_mutex MutexType; class MyClass { private: ...
[4 replies] Last: Thanks Galik! (by isnork)
clearing stringstream
 
In the project i am working on I have 8 different files that i need to read in a process. The files are named data1.txt through data 8.txt. I decided to loop ...
[2 replies] Last: i have tried that also and it does not work. omg lol nvm. I moved it ... (by tykkimies)
October 2011 Pages: 1... 313233343536
  Archived months: [sep2011] [nov2011]

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