Beginners - January 2012 (Page 44)

My first program, problem with large numbers.
 
I made a program to put in a number to check if it has a whole root. Helps me with math homework. BUT, I noticed if I input a large number that I know has a roo...
[7 replies] Last: In C++03 it would be compiler specific. In C++11, it becomes standard.... (by Mats)
loops for invalid entries
 
im having a problem with this loop where if a person does not enter m, f, or x it should loop to keep asking for a non-valid gender or to exit. however it asks ...
[3 replies] Last: hmmm it seems to work with a do while and a if statement. im not sure ... (by velvetymouse)
Templates how are they done?
 
please teach me how to mould a window dialogue box and use a skin and a template?
[6 replies] Last: it doesn't mean GM is bad No, Game Maker is bad. (by ascii)
Need help adding to collision detection algorithm
 
Hello, I'm using SFML, and I found this code for collision detection in SFML: https://github.com/LaurentGomila/SFML/wiki/SourceSimpleCollisionDetection It wo...
[2 replies] Last: Ok thanks. I'll just come up with my own algorithm. :) (by Chuckleluck)
by moot1
guessing game
 
I dont get whats wrong. Here are the errors. C:\Users\\Desktop\New folder\guessing game\main.cpp||In function 'int main()':| C:\Users\\Desktop\New folder\gu...
[6 replies] Last: oh wait nevermind they are both > (by moot1)
Multidimensional Array issue
 
I have the following code, and every time I run it it outputs about a million numbers of random value and I get the following error: Unhandled exception at 0...
[4 replies] Last: Sweet, thanks. ;-) (by Lvl80RetPaladin)
by stuted
project for an upstepping beginer
 
Hi Forum! I have been learning the basics of C++ from some sources, and i have finished a book on them. Since i don't know what should be a good project for ...
[9 replies] Last: http://sites.google.com/site/davevisone/home/cplusplus-programming-dow... (by Lynx876)
How to convert const char * to const char
 
I want to send a user defined text string from a client to server application. Here is the code that sends the data: #define DEFAULT_BUFLEN 512 in...
[4 replies] Last: I think your probably want something like this: #define DEFAULT_BUFL... (by Galik)
by stuted
project for an upstepping beginer
 
Hi Forum! I have been learning the basics of C++ from some sources, and i have finished a book on them. Since i don't know what should be a good project for ...
[4 replies] Last: @Krofna sorry for the repost, posted it at the same time... (by strongdrink)
Converting from allocator to vector
 
Hello, i´m new to this forum and looking for a little bit of help if I may. How can I convert a std::allocator<std::string to a std::vector<std::string and ...
[5 replies] Last: Well, then it should be easy enough to do! string::operator + vector... (by andywestken)
by swimba
Should I have main() run all function calls?
 
Is there any benefit to running all function calls in the main() so that there is no actual code in the main()? ex: int main() { functionOne(); funct...
[6 replies] Last: It is generally seen as good practice to sort out the structure of a p... (by andywestken)
Don't understand this cin/while loop example.
 
I'm reading a textbook (C++ Primer Plus by Stephen Prata) and currently at while loops and text input. He gives this code: int main() { char ch; cout...
[2 replies] Last: Yes, every time the expression "cin >> ch" is evaluated, it reads (and... (by Cubbi)
by nk2020
Centering output of a function
 
I have created a program that has a header file and a .cpp which creates boxes with border characters and fill characters according to what driver my professor ...
[7 replies] Last: I'm sorry, I don't/can't do peoples homework! If I do your homework; ... (by Lynx876)
"does not name a type" and "has incomplete type" errors.
 
Hello everyone, I am writing a fairly simple program that animates a sprite using SDL, and cannot get past the errors "'CAnim' does not name a type" and "fie...
[3 replies] Last: It isn't a problem with all includes in general, but just this situati... (by strongdrink)
by Veltas
system()
 
Does system do the same thing as Run on Windows?
[1 reply] : Yes , and can do whatever the Command Prompt can . Edit: could be m... (by Catfish)
&= and |=
 
http://www.cplusplus.com/reference/iostream/ios_base/fmtflags/ ff &= ~cout.basefield; // unset basefield bits ff |= cout.hex; // set hex ...
[4 replies] Last: x&=y; does the same as x=x&y; , as with all compound assignment ope... (by Athar)
A specific case of using assembly in C...
 
In a windows environment, how different is it to set the video mode to 13h for example? This is in comparison to a DOS setting where: MOV ax, 0013h INT 10h ...
[no replies]
char = () ?
 
Rather than hijack someones thread I've made this thread. Here is the OP: http://www.cplusplus.com/forum/beginner/58741/ I saw some code on his/her post th...
[4 replies] Last: Yeah, that's more than likely why I've never seen it like that! lol (by Lynx876)
by Thetr
mouse interactions
 
In my previous post (http://www.cplusplus.com/forum/beginner/58715/) I forgot to ask: Is there a way to enable mouse interactions with c++ program ? By that I ...
[2 replies] Last: Clicking in console ? How can I do ? (by hentaiw)
I'm having a problem.
 
Here is the example code from one of the books I'm learning from: #include <iostream> #include <fstream> #include <windows.h> using namespace std; #de...
[2 replies] Last: WOW, I think this book may be badly designed. I assumed it would be po... (by Integrater)
January 2012 Pages: 1... 4243444546... 48
  Archived months: [dec2011] [feb2012]

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