Beginners - May 2011 (Page 9)

need help asap!
 
So im working on a email parser that asks user to enter the file to be input and check the whole txt line by line for email addresses and only output email addr...
[2 replies] Last: Mmm... Perl... my $vec = '[a-zA-Z0-9!#$%&\'*+\-/=?\^_`{|}~]'; #v... (by Mathhead200)
email parser questions??
 
so i have been working on this program to prompt user for both input and output files with default file.txt if enter is hit so then after that i need to search ...
[no replies]
Whats wrong with templates?
 
/* saved as mypair.cpp */ #include "mypair.h" template <class T> T mypair<T>::getmax () { T retval; retval = a>b? a : b; return retval; } ...
[4 replies] Last: great.. thanks.. now im beggining to use .inl files to keep my header ... (by ealforque)
by brammo
Returning an array from a function.
 
I am a beginner with C++ and do not know object orientated code so please go easy on me. I am trying to return a 3x3 array from a function. The aim of the funct...
[14 replies] Last: Haha it's okay, I was just trying to make sense of what you had done :... (by ascii)
Do-While Loop not working
 
I'm writing a program to output a calendar month. When my program executes it only does the "do" part of the loop and automatically treats the first number I en...
[4 replies] Last: Thanks for your help, I switched it to a while loop and its working gr... (by Ishvite)
by ramako
problems with pointers and internal representation.
 
Hi, I've been thinking for a while and I can't understand how to write this representation: a pointer that points to an array of pointers in which each eleme...
[6 replies] Last: Thanks! The problem I had was that when i did the filaspointer=ne... (by ramako)
How to I hide text?
 
Im trying to create a hangman game witch im successful at that but one thing. I can't figure out how to make input not show just for one string. so this is what...
[4 replies] Last: Neither version cleans up after itself. Make sure to restore the termi... (by Duthomhas)
My program won't run :( NOOB question
 
Why wont this code run, i checked everything over many times: #include <iostream.h> #include <string> #include <math.h> using namespace std; int mai...
[10 replies] Last: ahaha, no problem! (by Lynx876)
by ascii
More Help With Foiling
 
A few weeks ago I wrote a program to foil two binomials, and its functioning, but I now want to allow the user to enter their own exponents using a caret ^ and ...
[1 reply] : Fixed it, nevermind! #include<iostream> #include<cstring> using std:... (by ascii)
how do you use srand and time so you always get a diffrent variable to seed rand ?
 
i need to to know how to use srand and time together thank you
[2 replies] Last: thnaks :D (by alfreddoozz)
Generating a very large range of random numbers.
 
double unifRandb()// Generate a random number between 0 and 1 { return rand() / double(RAND_MAX);// return a uniform number in [0,1]. } I've been using ...
[2 replies] Last: I don't recommend writing numeric libraries on your own - try this: h... (by kfmfe04)
Why won't my first character show up?
 
Hi. Writing a program that reads multiple strings into a vector, displays them, then does some other stuff to them. The problem is that the first character of t...
[3 replies] Last: Well. That makes sense. Thank you. (by vitruvianwoman)
by possik
problem with fstream
 
Hey guys, hope some of you will help with this problem i have. int main() { int ok=1,num=0,choice=1; char inff ; string filen; do ...
[2 replies] Last: yay that fixed my problem. thx a lot man, i was debugging that progra... (by possik)
by Squip
Votes Calculator Help!
 
Hi Guys, got a class project that ive been spending about a week on and off trying to complete it. I finally got the whole thing compeleted. Ive done whats been...
[no replies]
help with a problem
 
yes this is a class project but what i want to do is take it a step beyond what was asked for.this is what was asked for You will need to design an applicati...
[9 replies] Last: I see. Well, this forum tends not to hand out the answers to rather s... (by webJose)
Array Matrix
 
int matrix , i, j; for (i=0; i < 2; i++) { int *ptr = matrix + 2*i; for (j=0; j < 2; j++) ptr = (i+1)*(j+1); } hey guys, i got across this in one of ...
[5 replies] Last: line 6 (in my code) sets ptr to ith row of matrix. Here * is only the... (by hamsterman)
by Ali89
Problems with object instantiation
 
Hello, Is it impossible to instantiate an object of class A in a method of class B ?. In other words, Do we have to instantiate objects just in the main ?. ...
[3 replies] Last: ُThank you so much :-). (by Ali89)
Output to text file
 
First off, thanks for helping. My problem is that I am trying to output the coordinates that I have generated into a .txt file. I copied the code for the text ...
[2 replies] Last: Thank you so much! (by closed account zbREy60M)
by Drue
C++ Current Location
 
What would a C++ code be for the current location of a file?
[8 replies] Last: It was for something else. I friend gave me permission to mess with h... (by Drue)
Template Constructor Confusion
 
In definition of pair class: template <class T1, class T2> struct pair { typedef T1 first_type; typedef T2 second_type; T1 first; T2 second; pair(...
[2 replies] Last: I was under the impression that the function template "template <type... (by jeffbmartinez)
May 2011 Pages: 1... 7891011... 48
  Archived months: [apr2011] [jun2011]

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