- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
This problem is to print a square using a number that the user enters, which would be in the center. If the user entered a 5, then the program should output this: 111111111 122222221 123333321 123444321 123454321 123444321 123333321 122222221 111111111 If you're wondering, this was not a homework assignment. … |
|
I have a question of how it would be possible to change the IP address to a randomly new IP address. How would I go about to do this ? |
|
Hi guys. I want to write a keylogger which logs all strings I copy via <CTRL>+<C> My problem is that I loose track of interessting links or code-snippets when overdoing it. So I want a basic keylogger which notices every hotkey event and copies the content in the clipboard into … |
|
#include<iostream.h> #include<fstream.h> #include<conio.h> #include<process.h> #include<stdio.h> #include<string.h> int access=0; // for accessing data modifier functions int report_s=0; int report_u=0; class element { int at_no; float mass_no; char name[15]; char symbol[4]; int group,period; //for displaying the table public: void input() { cout<<"enter elements name \n"; gets(name); cout<<"enter its symbol \n"; gets(symbol); cout<<"enter … |
|
Hey daniweb, I stumbled upon an issue I can't solve myself. Here is the code : #include <sstream> #include <iostream> template <class T> inline T htot(std::string str) { T x; std::stringstream ss; ss << std::hex << str; ss >> x; return x; } int main() { int x = htot("0x0F"); … |
|
Ok, when I run my program it is asking me twice what I only need to be asked once. [code]#include <iostream> #include <iomanip> using namespace std; int main () { //Variables double calories = 0.0; double weight = 0.0; char gender = ' '; char level = ' '; //enter … |
|
Hello I already posted this on [URL="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=306688"]opengl.org[/URL], but nobody seems to have a solution. Basically I set up Opengl and when I want to draw 3D or say I want to use the z-axis by translating in this dimension, it doesn't have any effect. What I can do, is moving … |
|
Hi everybody, I wrote a game in which you have to guess a number generated randomly,but when i try to assign a random number to the variable, it just doesn't work but it compiles fine. The code : [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () … |
|
Hi. I want to read through a file and search for variables saved in it. However if the stream reads the last char I got errors like EOF. For example the following code would not work as intended to : [CODE] bool BaseFileReader::Valid() const { if (!File.is_open()) std::cout << "\n\nERROR: … |
|
how would i stop a user from entering a letter when they should be entering a number? [CODE]#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> usin namespace std; int main(int nNumberofArgs, char* pszArgs[]) { char nAns; do{ int nPly1; int nPly2; int nPly3; int nPly4; int nPly5; int nPly6; int … |
|
I'm using SDL to make a game and I'm using frame independent movement, everything works fine with no gravity or acceleration: [CODE]boxOffsetY += yVel * ( DELTA.get_ticks() / 1000.f );[/CODE] The box moves accordingly, no matter what frame rate i use. But when i try to add gravity: [CODE]yVel += … |
|
I know that there is a sticky thread and i know that maybe i repeating things that already mentioned but i am totally confused. I am interested to study about game programming,i don't study i bought a book and i am near to finish it about c++. i goggled and … |
|
Hi community First I want to thank everyone who will look through this, because it's a longer post. I'm currently reading a book on AI by Mat Buckland. I'm re-building Mats entitymanager, though I just copied it. He used std::map to collect all entities as pointers which are cross referenced … |
|
well i have made a .txt file (for save /reload blah blah ..) ..i want it blank before program runs ..how can i do it - or is there any way i can create a new file every time overwriting the existing file |
|
Hello, I'm in a beginners c++ class and I need to write a program that calculates the area and perimeter of a triangle of sides: a, b, and c. The lengths of each side (values for a, b, c) are written in an input file (.txt), so the program has … |
|
Hi The following code shows good enough how to multiply two long data [CODE]long x = 10, y = 3; long p = 0; while (y > 0) { if ((y & 01) != 0) p += x; x <<= 1; y >>= 1; } std::cout << "\nResult : " … |
|
Hi I'm trying to write a program that will print the results of the series sqrt(1), sqrt(1)+sqrt(2), sqrt(1)+sqrt(2)+sqrt(3),...., sqrt(1)+sqrt(2)+sqrt(3)+...+sqrt(n) where n is chosen by the user. The output should look something like 1, 2.414, 4.146, 6.146, 8.382, 10.831, ..... Here's what I have so far [CODE]#include <iostream> #include <cmath> using … |
|
How do I compare what is in one array with what is in another array? |