General C++ Programming - August 2014 (Page 22)

how to cin in c++ without pressing enter key.
 
suppose i want to get values from user during run-time which are 1 and 2 and put it in variables a and b; but without use of enter; user should type "1<space>...
[4 replies] Last: Could you just: std::istream::getline(string, 1024, ' '); ?... (by ResidentBiscuit)
301 Moved premanently
 
Im trying to make a console program that tries to login to this site. Im not using any libraries, they just confuse me. The question is not really much of a pro...
[1 reply] : For more info, try the code out yourself No. It's your job to descri... (by ResidentBiscuit)
What are special numbers ?
 
hello everyone pls tell me what are special numbers ? if possible pls send the souce code on that . thanks
[4 replies] Last: [quote=cnoeval]It's not nice to consider ANY number as special in thes... (by Peter87)
Sort by date
 
Hi all, I'm trying to sort by age a vector of birthday dates. I'm using the functions in the <ctime> header to calculate the difference in seconds between two ...
[1 reply] : Well, I didn't try to debug your entire code. I do think there are err... (by Chervil)
pointer arithmetics debugging
 
I have a code #include <iostream> using namespace std; int main(){ char * * stringg; cin >> * stringg; cin >> *(*(stringg) + 1); ...
[14 replies] Last: Well I did try to read as much as I could from GotW link the Heap VS F... (by danicpp)
by Nison
I don't know what to do..
 
You can skip the tale from "{" to "}" if you want but i think it will give you a better understanding of my problem. { I have hard time deciding what to do....
[18 replies] Last: guteyuro If i may ask. What was your issue? There was no issue. "g... (by MikeyBoy)
<SOLVED> Unsigned char array - assigning values converted from double
 
Hi, I'm having a pretty weird problem. I've created an unsigned char array for an image buffer: buffer_rgb = new unsigned char[_w * _h * 3]; memset(bu...
[1 reply] : Solved. If anyone is interested, it was a simple matter of std::ofstre... (by tsvilans)
Help on switch
 
Here is my current program https://gist.github.com/anonymous/6e0dd7c29da634a41aac if you use it, it will ask which are you want to find, after you type in...
[1 reply] : Create a function for. Area of square say int areaOfSqaure ( ) { //co... (by N495t4r)
I/O Issues
 
I have a sort of game I have created that takes input from the terminal window and uses it to manipulate an array also in the terminal. My problem is that I wan...
[3 replies] Last: @NT3 I wanted to use the terminal because I thought that graphics woul... (by Pi Lord)
Need help with Looping file.
 
So I want to loop a file so that the user can log in. For example i got this .txt file: asd fgh zxc vbn qwe rty tyu iop where the first word is the use...
[2 replies] Last: I'm not too sure how to do it, this is my current program. Its a Sign ... (by wakamoe)
by ahlee
Altering code in Photoshop
 
I was wondering if its possible to change the color of the anchor point in the transform tool. Is this possible? Sometimes I'll move it and it takes forever ...
[1 reply] : It's code that applies projective transformations to vectors, presumab... (by helios)
Autocreate function (with monsters!)
 
Hi guys, I need help solving a problem in my game. I have around 10 different objects in my game (doors, monsters, swords.. etc) that each have their own indiv...
[3 replies] Last: Thanks for responding. (by programmer321)
cannot appear in a constant-expression (list)
 
Hi. Why do I get the error 'rec' cannot appear in a constant-expression ? I have the following definitions: ... string rec ; list<rec> musicList...
[17 replies] Last: If it is defined inside of a function is it scoped to that function as... (by giblit)
QR code compilation
 
I am trying to make a qr code from this sample code from http://www.codeproject.com/Articles/593591/Simple-C-Cplusplus-QRCode-Library Here is the code: // ...
[5 replies] Last: You would do the same thing to fix that as you did you fix the encode_... (by giblit)
Game inventory
 
Hi =). I was wondering if anybody could point out some smarter techniques for creating a simple RPG game inventory system which the player could access and the ...
[6 replies] Last: If you want to get into graphical games, I recommend you just ditch w... (by Disch)
Banking Program
 
Trying to design a banking program. So, the program starts by having the user enter his/her initial amount in the bank. Then, a menu displays asking if the user...
[4 replies] Last: Thank you! (by jesslich)
by Usha
Conditional debugging
 
I am using MSVC 2010 express edition. I am trying out conditional compilation program. I have the following files FILE 1 ****** myfunctions.h ============...
[3 replies] Last: But still it was giving error. What error? In functions.cpp, whe... (by AbstractionAnon)
Why is my basic battle system failing? [no compile errors]
 
Here's the source code from "battle.h" (which should probably be renamed to "animal.h") Do you think I made my errors here or in one of the many other headers ...
[8 replies] Last: Since other people gave you a lot of good advices. I will give you thi... (by Ceset)
by iebwen
how to find repeated words
 
I'm currently on an exercise that specifies that I find any repeated words, "the the" for example, in a string, print the word that is repeated and how many tim...
[7 replies] Last: I had a project that parsed and wrote pickit files for a bot... and fo... (by roger911)
Arrays and smart pointers
 
I'm writing quite a large program that needs to work with very large arrays (up to 100 million integers). It is necessary that i can access every point of the a...
[6 replies] Last: As per your requirements you really ought to consider using a std::deq... (by Duthomhas)
August 2014 Pages: 1... 202122232425
  Archived months: [jul2014] [sep2014]

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