General C++ Programming - July 2013 (Page 16)

Another input validation
 
How do you do the input validation for date? I used: char rec.date ; cout<<"date"<<endl; cin.getline(date,SIZE); I want the user to write in this fo...
[3 replies] Last: http://www.cplusplus.com/forum/general/106395/ (by ats15)
Input validation
 
Hi. How do I prevent user from entering characters or symbols instead of numbers? int num; cout<<"Enter a number."<<endl; cin>>num; Also, how do I prevent...
[9 replies] Last: I know for a fact that this code works, because I just tested it. d... (by Thumper)
by ajh32
communicating with web service via SSL via proxy server
 
I am attempting to communicate with a web service using SSL i.e. port 443 via a proxy server. I can create a socket and open a connection to the proxy server b...
[no replies]
by chawki
mathematical form
 
hello, I try to develop this form: RTTbarre(k)= lambda*RTTbarre(k-1)+(1-lambda)*RTT(k) RTTbarre(k-1): is the previous filter calculates RTT(k) RTT(k)is calcul...
[no replies]
Hopefully this helps in parsing decimal numbers..
 
I've seen a lot of posts around the net about parsing decimal precisions. The problem is everyone wants to use atof or atod, which while faster produces inaccu...
[1 reply] : [quote=zerohour ]The problem is everyone wants to use atof or atod, wh... (by TheIdeasMan)
Rounding Numbers to hundreds
 
Hi everyone, I have made a random number generator to create a number between 1000 and 9000, but I always get numbers with many 10s and units. I want to roun...
[4 replies] Last: Thanks, it worked. (by speedbird)
random deck-card selection
 
I'm writing a card game and I'm having trouble getting the first part of it right, which is picking out a random card from the deck and displaying it to screen....
[1 reply] : Hi Sofia29, You probably need to seed the random generator, as per th... (by TheIdeasMan)
LinkedList
 
Hi, I am trying to implement a simple Linked List. When I declare the class DbLinked, the compiler give me an error:2 \progetto1\main.cpp required from here ...
[2 replies] Last: It would be better if you would define inside DbLinked some internal c... (by vlad from moscow)
combine inputs
 
How to combine the if statements? cout<<"Enter a sale number"<<endl; cin>>rec.sale; if(cin.fail()) { cout<<"Enter a number"<<endl; cin>>rec.sale; ...
[13 replies] Last: Thank you!!!! (by puppymew)
irrkland Question
 
output: D:\Pictures\CustomStory\main.cpp|26|error: 'createIrrkLangDevice' was not declared in this scope| #include <irrklang.h> #include <windo...
[1 reply] : I would guess that createIrr kL angDevice() is a typo (by coder777)
Issues with code-blocks and opengl
 
What i'm trying to do is create a 3d game engine with opengl and i want to be multi platform. I'm trying to use code-blocks for this reason but i'm having troub...
[1 reply] : OpenGL on its own does not have a single crossplatform way to set up a... (by Disch)
Board not printing correctly.
 
Hello. I'm writing a version of the classic Snake game. However, my board is not printing correctly. The right hand border is in the incorrect location. Also, w...
[5 replies] Last: why keep the border in the same array? you can just hardcode the borde... (by Paoletti301)
SDL_image.h help
 
So im wanting to make a program in sdl and im learning on lay foos site. evreything was working fine until lesson 3-4 (im using windows/code::blocks/mingw btw) ...
[13 replies] Last: ty sorry for bothering you fred. probably shouldnt code at one in the ... (by closed account Dy7SLyTq)
Remove digits in number
 
I know how to remove digits in number from right to left. For example: the number 319. If I do (number /= 10), I get 31. My question is how can I remove digits...
[15 replies] Last: ok.. thanks JLBorges! (by abhishekm71)
Pointers
 
I have passed an array called originalname to the reverseWithPointers function below using a pointer and I have returned output from this function to the main p...
[5 replies] Last: void reverseWithPointers(char *originalname, char *reversedname2) { ... (by closed account 98qiz8AR)
by tee360
Complex problem (Friends, Overloaded Operators, and Arrays in Classes)
 
I'm not sure if I'm violating by posting my question before I finish my futile attempt at it, but in attempt to not waste too much time, here goes: Imagining...
[12 replies] Last: I believe I've fixed 2 out of 3 perceived problems (of course there ma... (by tee360)
C# and Javascript Tutorials for Unity3D
 
Found out that Unity3D now offers a FREE and fully commercial licence so I've got myself a copy but unfortunately it only uses C#, Javascript or Boo scripting.....
[3 replies] Last: A c/c++ programmer would find using unity c# very easy, its a very wel... (by vas90)
Another GLUT Question?
 
Why dosent this light my cube up? #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <stdlib.h> float yup = 0.0f...
[no replies]
how to build an smtp mail client?
 
i have four email adresses (for various reasons) and i could probably find a client for all three on source forge, but i thought it would be good practice to us...
[2 replies] Last: thanks (by closed account Dy7SLyTq)
GLUT
 
This is supposed to make a cube, and then color the cube, and color the background, the background gets colored, but the cube is no where to be seen, and there ...
[1 reply] : Your pen is the same color as your paper Your drawing is too big (by ne555)
July 2013 Pages: 1... 1415161718... 34
  Archived months: [jun2013] [aug2013]

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