General C++ Programming - August 2013 (Page 8)

string and atoi
 
How do I use string and atoi at the same time? string scroes; char input ; cout<<" Enter your score" << endl; cin.getline (input, SIZE); scores = at...
[1 reply] : As it follows from the name of function atoi it converts an object of ... (by vlad from moscow)
I'm working on a text adventure
 
If anyone knows how to shorten this I would be greatful. Also, I'm stuck towards the end where it gives you either option 1 or 2. #include <iostream> usi...
[5 replies] Last: @roger911 I wouldn't worry about Sleep The Sleep function is exporte... (by andywestken)
C++ Timer for function
 
I am doing tower of hanoi, and need calculate the time for the function. However,i try many type such as time.h or windows.h...Since the function is recursive a...
[1 reply] : Timing is often done in loops. Do your function a hundred-thousand ti... (by Duthomhas)
by wineo
Socket
 
Freegate is proxy can i use socket to use freegate to requst ban website? how? like browser that set proxy , i wanna doit by socket in c. thanks
[no replies]
printing a string to a file
 
// these are the errors that I'm getting from an online c++ compiler // main.cpp:4:10: error: #include expects "FILENAME" or // main.cpp: In function 'void p...
[7 replies] Last: http://translate.google.com ? Heheh (by S G H)
by j2013
Sentinel
 
hi, can anyone guide me how to make my sentiel code work. Tks
[5 replies] Last: I didn't understand before ok make alphabet an array Then not inside t... (by timprograms)
stray errors
 
i can't actually understand the error. can anyone please help me. #include <iostream> #include <iomanip> #include <string> #include<cstdlib> using namespace...
[15 replies] Last: @Grey wolf & naraku9333 Thank you soo much (by arvind1)
GLSL texture mapping - need some help
 
Hi, i started learning GLSL recently, and now i try to make a simple program with a single texture on the ground: ( GLfloat m_colcoords ={0.0f, 0.4f, 0.0f,0.0...
[3 replies] Last: Yupp! that was the first problem, thanks a lot:D There was another wit... (by pandasd)
by Ceset
test.exe stopped working
 
#ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif #include <SDL/SDL.h> #include <string> #include <SDL/SDL_image.h> SD...
[6 replies] Last: yes i agree but if we talk about a newbie(just like me) they just do w... (by Ceset)
by Gor
webBrowser error
 
string x = msclr::interop::marshal_as< std::string >(textBox1->Text); string::iterator i; int a = 0; int k = 0; for(i = x.begin(); i < x.end(); ++i) { +...
[1 reply] : I think you will be looking at something like: //... String^ result; ... (by closed account z05DSL3A)
by andrix
binary tree
 
hello there i'm trying to implement a binary tree using this class: class btree{ public: int key; btree *left; btree *right; btree(){left=NULL; right=N...
[6 replies] Last: ok nice thanks (by andrix)
DirectX
 
I've got down 2d programming with SDL pretty well making a engine and what not and am about to start learning 3d programming with DirectX. ( Don't recommend oth...
[2 replies] Last: Nice to know I'm not the only one who is in a lack of resources... Or ... (by BluRezZz)
by eastw
Reading certain line instead of all
 
Hi guys,how do i implement codes where it shall prompt for an user id. From the input,the system shall look into the file..and output if the data exist. F...
[7 replies] Last: I would suggest storing the data in a container when getting it from t... (by Tertius Kgatla)
Good C++ Exercises?
 
Hey everyone, I wanted to ask if anybody knew some C++ exercises or PDFs full of exercises out there. Thanks so much for answering
[3 replies] Last: Thank you both! (by reedrocks58)
by CroCo
Python to C++ code?
 
I'm not sure if this appropriate post but I found no place to post it except here. I would like to translate the following code to C++ p[0, 1, 0, 0, 0] wo...
[3 replies] Last: @helios, thank you so much for this code. However, I'm still not gett... (by CroCo)
by eastw
c++ File Problem
 
Hi,everyone..this below is one of my functions..but currently having problem to read the file.It couldnt read the data properly.Can anyone plz assist on this? ...
[2 replies] Last: Hi,ty for replying.. By referring to ur codes..i redo my codes as fol... (by eastw)
by Wake
Read last line text file (1,2)
 
Guys need some help, I am making a script to read the latest from a text file. the script already does this but I'm kind of lost to adjust some things He pi...
[38 replies] Last: #include <iostream> #include <fstream> #include <string> #include <v... (by closed account N36fSL3A)
File reading and code modularity using ifstreams
 
Hello all. I need some advice on how to compact my code. I have a file that my program will read several times. Each time a different test will check it for som...
[4 replies] Last: There's nothing that specifically concerns me. I've recently been prog... (by ekuang1)
Help improve this calculator
 
I'm an ultimate beginner of C++ . How do i make this calculator restart without re-running it? I heard of loops, but I'm still not sure how to use those. also,...
[2 replies] Last: Thanks, ill try that! (by HuntedHD)
by maniac
Excersices (1,2)
 
Hi :) Can you recommend me a good site with C++ excercises? Exercises about data structures like stack and linked list, about inheritance and other useful and l...
[32 replies] Last: I think this will do: vector<int> vNum; void BubbleSort() { for (vec... (by Yueeng)
August 2013 Pages: 1... 678910... 28
  Archived months: [jul2013] [sep2013]

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