Beginners - July 2012 (Page 19)

by skarla
help
With the find() find the first character. with the rfind() the last. what will use so to find all the same characters? i mean if in one word there are th...
Jul 20, 2012 at 10:07pm
[5 replies] Last: That's clever badAlloc :p pos = str.find(sea, i); //don't need int(... (by soranz)
Basic array (1,2)
I am very new to programming c++ so bare with me. I was making something for a friend for his game and well it works obviously but I was wondering if somebody ...
Jul 20, 2012 at 9:45pm
[25 replies] Last: I still do not know how I would make a sort of search engine. (by Gkcha0z)
Payroll Program Using Functions
I built a payroll program using functions but I'm having some trouble executing it. Can anybody find my errors? #include<fstream.h> //file input output st...
Jul 20, 2012 at 8:56pm
[16 replies] Last: I actually figured it all out and got the program to run with my "empl... (by LaC0saNostra)
Enum as return value from a function!?
I worked on the following code for a while and I encounter always the same compilation error. The code is not complete. Anyway, why can't I have a enum a...
Jul 20, 2012 at 8:52pm
[8 replies] Last: one word: AWESOME! Thank you!! (by timeout2575)
bit operations error
I'm having the following error at the following line: if( ( (res >> i*8) ^ cmp ) != 0x00) the error is: error: invalid operands of types 'void*' and 'int...
Jul 20, 2012 at 7:42pm
[3 replies] Last: Maybe it's something like one of those xor linked lists? Anyway, to c... (by Cubbi)
Global variables and callback functions
So I'm pretty new to programming. Maybe this is a dumb question but is there a way to avoid global variables when using stuff that requires callback functions? ...
Jul 20, 2012 at 6:41pm
[1 reply] : It depends on situation.But memory should not be problem for beginners... (by Akshit)
by jkb211
Converting Celcius to Fahrenheit from String
For a beginning c++ class I need to input a file with different celcius temperatures and have the program convert those into fahrenheit and output them as a .tx...
Jul 20, 2012 at 4:55pm
[4 replies] Last: stoi worked like a charm. thank you so much. (by jkb211)
Two dimensional char array
I am trying to write a program which will ask the user how many names they want to enter and then it will allow them to enter that many names. My problem is the...
Jul 20, 2012 at 4:33pm
[2 replies] Last: Exactly what I was looking for, thank you very much. (by tjhadsall)
by samrux
3 Questions for my Adventure/Mystery game; Saving/Loading data, Text Color and Sound
I have Windows 7 and use Dev-C++ 4.9.9.2 I'm making an adventure/mystery batch console game, i recently finished Chapter 1 and i started adding ASCII pictu...
Jul 20, 2012 at 4:28pm
[16 replies] Last: okay thanks! (by Saint Squireen)
Very basic tutorial for beginners?
Hello everyone, i am thinking about making a tutorial for beginners in c++, i have noticed that most of the beginners are insulted on forums (you have the right...
Jul 20, 2012 at 3:48pm
[4 replies] Last: fair enough. (by Disch)
Reserve size of vector<vector<float> >.
I'm having such a trouble: variables: int mRows, mColumns; mValues <vector<vector<float> >; Matrix::Matrix(const unsigned int rows, const unsig...
Jul 20, 2012 at 3:28pm
[4 replies] Last: You're right, absolutely right, i gave me quite a fresh look on a subj... (by Beniamin Kalinowski)
by skarla
how?
i am creating hangman and i have two strings guess and word if in word find my guess(using find()) if found it it is replaced(using the replace()) but if th...
Jul 20, 2012 at 3:19pm
[6 replies] Last: i am creating a hangman and when i must find a word like this:pop my p... (by skarla)
by Ch1156
What am i doing wrong
I have my code and i cant seem to figure out what im doing wrong? #include <iostream> #include <string> #include <ctime> #include <random> #include <f...
Jul 20, 2012 at 3:07pm
[11 replies] Last: I would also advise you to read about classes again, you are confusing... (by sigmablack)
by KarelC
Receiving random numbers below zero, when range set by user
Hello, I've recently started programming again after a long intermission of a year or so (Only ever learned basic programming in Visual Basic) But I've decided ...
Jul 20, 2012 at 12:00pm
[4 replies] Last: Oh thank you. Completely overlooked that, so simple. Sorry for wasting... (by KarelC)
by skarla
replace/
i have a string. for example string s="!!!!!" if i want to make it like this:"!!s!!" i mean to replace the third ! with the letter s,what will use? repl...
Jul 20, 2012 at 11:40am
[11 replies] Last: Thank you man,i found it. i just thought that the second number is wh... (by skarla)
by vrakas
Revesing a string
How can i reverse a string using the reverse() and reverse_copy() functions from <algorithm>? (i want to copy on a string the reverse of the first n characters ...
Jul 20, 2012 at 11:28am
[4 replies] Last: yes:) i figures it out know, Firstly i need s1.assign(n,c);//c has an... (by vrakas)
by cniper
converting string to upper case
i m supposed to write a program which asks user to input a string and then convert it to uppercase if lowercase alphabets are present. here is my code #includ...
Jul 20, 2012 at 11:07am
[8 replies] Last: #include <algorithm> Also, remove that include duplicate, you included... (by FeZedra)
How to name variables and function properly
Hi guys. I have looked through others code. And i am seeing that people like to use _ when naming variables. I wanted to ask, why are you doing this and are...
Jul 20, 2012 at 10:45am
[4 replies] Last: Thanks for all good replies. Just the answers i was looking for :) (by stoffe1100)
this - Why asterisk
Hi all! I was reading an explanation about the this-pointer, and I came across the following code: #include <iostream> class Calc { private: int m_...
Jul 20, 2012 at 8:59am
[4 replies] Last: Thanks! I got it now. And @Euqirne VSR: You absolutely was of alot of ... (by Fransje)
Find the mistake
There's a mistake in this program and I have to find it, but I dont find it anywhere. Any help please? #include <iostream> using namespace std; int main...
Jul 20, 2012 at 8:38am
[7 replies] Last: I didn't find any error on that line ? did I overlook something? a->a... (by ThangDo)
July 2012 Pages: 1... 1718192021... 54
  Archived months: [jun2012] [aug2012]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.