Beginners - November 2014 (Page 11)

How to erase all non alphanumeric characters from a string?
 
I want to erase all non alphanumeric characters from a string. I've tried the following way using erase() function. But it erases all the characters from where ...
[6 replies] Last: Thank you all! :) (by abdalimran)
Create a 2d vector of pair ints
 
How would i create a 2d vector of pair of ints, and how do i iterate through the positions?
[8 replies] Last: class Test{ public: vector<vector<pair<int, int>>> Objects; }; v... (by keskiverto)
random num gen
 
Why am i getting random numbers in between 100,000 and 120,000? I have all the required #includes and seeded the time to NULL. I want to get the numbers random...
[1 reply] : #include <iostream> #include <random> // http://en.cppreference.com/w... (by JLBorges)
by aj3423
question about split compiling
 
Hi, I used to like all-header style, I mean write the definition and implementation all in single .h file, I thought it's convenient. But now I got a pro...
[2 replies] Last: Indeed, but it's still slow.l (by aj3423)
class with operator overloading , read and write in file
 
this is a project for my class, and I am having a lot of errors. It is supposed to be done through class and Scheduler should be able to import a list from a fi...
[no replies]
Character Converter Class (1,2,3)
 
I need to create a character converter class. Here's the instructions: Create a CharConverter class that performs various operations on strings. It should ...
[46 replies] Last: I'm glad you have this figured out. (by swp147)
Reading chars into an array
 
I am hoping you can give me a little insight into my programming errors. This program should compare user entered answers to the correct answers. It should th...
[6 replies] Last: SOLVED! Here is the correct code: #include<iostream> using namespace... (by speakerboy)
Undefined Reference To.... Error
 
I'm not quite certain how to tackle this. The following code is part of what I'm trying to compile. I've included the prototypes.h, the .cpp file for the erro...
[2 replies] Last: Sonofa.... Yeah, that was the issue. I knew it was something basi... (by Blackwell7six)
RNG Won't Initialize
 
I feel stupid right now cause I'm copying the exact code my prof posted and it won't work. It say's 'time' is not declared in the scope. Using codeblocks with...
[1 reply] : You need to #include <ctime> he probably can compile without it beca... (by giblit)
Expression arithmetic with cell
 
I need help with arithmetic expression with cell How to make a push and pop function?
[7 replies] Last: You may want to read up on postfix-infix and vice versa conversion. It... (by giblit)
the game of life
 
I have 3 errors on my game of life program: 2 of the sort "a function- definition is not allowed before '{' token " 1 error expected '}' at end of input I woul...
[5 replies] Last: thanks man (by NickNingaba93)
QuickSort - Recursion Problem !!
 
In Function QuickSort.When I call recursive QuickSort, it's happen somethings wrong. #include<iostream> using namespace std; void input(int *a, in...
[no replies]
Help with 2d array
 
Hi i need to create program to change posiion on 2d array's. ex.I need to change postion on a00,a01 to b00,b01. Ex. a00=1 a01=2, b00=3 b01=4, and i need to cha...
[1 reply] : Anyone to help ? (by Schwarz)
by koko82
Recursion array is it right?
 
Hi All, I am doing an excersise with recursion having correct return codes. If it matches or not matches an array element. I have managed to do it using a glob...
[1 reply] : It would be nice to have some descriptive symbolic names for your cons... (by tcs)
ennumeration/namespace code
 
I am a new member, and have been taking c++ classes since January of this year. I am trying to create the program that generates a student status report from th...
[4 replies] Last: I might of overdone it when changing the deriveClassLevel(...), thanks... (by klanier)
Code compiles but input and output is incorrect
 
So my code is compiling but not inputting or outputting the way that I am looking for. My As always any and all help is very appreciated thanks so much. #i...
[2 replies] Last: This is helpful for sure thank you I figured out some other problems i... (by JackHawk)
by koko82
Recursion perception help.
 
Just trying to learn recursion but a little bit confused got loops in my head but it looks like recursion works in a very different way. In the example jumping ...
[4 replies] Last: Thanks for the help, got to the part of stack, but when I did a cout o... (by koko82)
Problem with file input.
 
The program will open my file but there is no output to the screen. Here's the file: Mike Sullivan, 443-207-1111, 123, 0 Mary Surber, 401-682-2222, 234, ...
[2 replies] Last: So how would I print it out? I think I have tried just about everythin... (by jdougherty)
c++ how do i create a adjacency matrix from 2 files
 
i have a program to calculate the MST using prims algorithm but the only way i have it working is if the input is the actual adjacency matrix. the input we are ...
[no replies]
Geometric nightmare
 
Hello, this is driving me crazy. I am trying to make an elementary geometric calculation, the length of arc of a semicircunference, and I am not getting the M_P...
[4 replies] Last: Ok, it's very embarrasing. Now I see it. Let's say x = cos (theta). ... (by geonightmare)
November 2014 Pages: 1... 910111213... 65
  Archived months: [oct2014] [dec2014]

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