Beginners - May 2013 (Page 31)

Finding characters in strings
 
Hello guys i'm new to this forum and to programming in general. So for school I'm supposed to compile a program that takes a user input into a string, and then ...
[1 reply] : If you are speaking about standard class std::string then you can use ... (by vlad from moscow)
Strings `find` function!
 
Hi, let`s say I input a series of strings separated by 4 spaces like: string x="Hi my name is bob"; i know if i do this: x.find(" "); it will give me the nume...
[2 replies] Last: for ( std::string::size_type pos = x.find( ' ', 0 ); pos != st... (by vlad from moscow)
Help fixing an infinite loop
 
I'm trying to write a function for checking whether the user wishes to continue, and then another function to check whether the input was valid. For some reason...
[3 replies] Last: Thanks guys! That got it working! (by sadistic)
SYNTAX- I'm a beginner and need some help.
 
I set out to make a Random number generator. I am still new to C++. I made my first random number generator, then tried making it a different way, and then ano...
[11 replies] Last: My code generates a random number from 1 too the int variable, which r... (by Rougeace4)
by ECE07
conio.h in visual studio
 
Hi, I wrote a simple program in Visual Studio 2012 to add 2 and 3. The program will not run without "conio.h" and _getch();, the exe window disppears as soon as...
[7 replies] Last: Better yet Keep the console open long enough to see your program's o... (by Duthomhas)
stuck on prime numbers
 
So, I am trying to find prime numbers between 1 and 100. I know what prime numbers are. I am using this technique to come up with the prime numbers: a) I wil...
[14 replies] Last: http://www.cplusplus.com/forum/beginner/101355/ (by eyenrique)
novice
 
Hi guys this is a really simple code , but I keep getting this error for line 16. PLEASE HELP. // Listing 2.2 using std::cout #include <iostream> ...
[4 replies] Last: Thanks bro this is the second program I ever wrote. A computer progra... (by zopticalz)
by giblit
Simulation problem (1,2)
 
I am making a simulation program based on some old forum topic that I thought would be interesting to try and make it 100 shooters instead of 3 and to have the ...
[26 replies] Last: Output continued: Gunman 43 has 1296051 kill(s), 1000000 death(s), an... (by giblit)
string class with pointers?
 
so im trying to write this code that will display value of the pointer (not the address) of the parameter to the monitor. i can get it to work with c-string...
[2 replies] Last: Thanks got it to work (by ninthred)
by Aceix
Usage of reference operator
 
When something like the below is done, what does it mean? const sf::Texture& texture=font.getTexture(); //font is type sf::Font, and sf::Font::getTextur...
[5 replies] Last: Talking about the usage of the & operator in "sf::Texture&" In this... (by andywestken)
Linker Error!!
 
I have a linker error in my two functions and I cant figure out why. Could you please help me. The error is this: Undefined first r...
[8 replies] Last: float was a requirement by the spec sheet i was given otherwise double... (by TECKSPEED)
by xsxs
array help!
 
Hi! I recently began learning arrays and I was wondering if someone was able to help me with the question below. Declare a two dimensional 5 by 10 array and ...
[5 replies] Last: ok, thanks for your suggestions but i have tried and it my code still ... (by xsxs)
C++ Win32Api
 
Hello, I am beginner to WIN32 API library, I am using Visual Studio 2012 Express, and I just created win32api file with precompiled header. Before that i ...
[3 replies] Last: I think that you simply skipped the statement where the msg is defined... (by vlad from moscow)
c++ sudoku
 
hey guys.i must write a sudoku with c++ but i havent got enough information i learning new is there any one help me ?
[2 replies] Last: no solver its just sudoku game (by Omer Can)
please help me !!!
 
#include <iostream> #include <string> #include <numeric> #include <functional> int main() { std::string s1 = "agatgctagatttcg"; std::string s2 ...
[3 replies] Last: thankyou so much, you save my life. (by zzh0008)
Finding words that begin with specific letter
 
Hello The program starts out with the user inputing a few words like food table fast computer life fear then it's supposed to find the words that...
[4 replies] Last: The reason this works is because a std::string is really just an array... (by giblit)
Arrays
 
Hey so I am in a class where we are using Microsoft C++ and right now we are working on a program using arrays. We are given a problem where we have to sort peo...
[2 replies] Last: #include <iostream> #include <conio.h> using namespace std; int... (by beginnerstudent)
best way to save and encrypt data?
 
i have a program that currently saves and encrypts data in a database. but is there other ways to save data and still encrypt it?
[2 replies] Last: Or a txt file and save as text if you are encrypting a txt document (by giblit)
Need some help
 
I'm completely new to programming, and I'm using a book called 'Accelerated C++' by Andrew Koenig and Barbara E.Moo. I'm trying to make the program Hello World...
[4 replies] Last: He's doing it the faster way not including every std namespace but ins... (by giblit)
Need Help!! (1,2)
 
I need to know if this code will compare two values in arrays at the same index and if it is above a certain value assign True to a third array and false if oth...
[31 replies] Last: I redid my functions for that part of my program because I was confusi... (by TECKSPEED)
May 2013 Pages: 1... 2930313233... 66
  Archived months: [apr2013] [jun2013]

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