- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 16
- Posts with Downvotes
- 12
- Downvoting Members
- 10
I like to learn new computer languages, I like a challenge, I do martial arts, and I like to have fun.
- Interests
- C++, C#, Java, Android Development, XNA, DirectX
- PC Specs
- notebook hp pavilion dv6 AMD quad core
66 Posted Topics
Re: That code didn't work for me so I modified it. This code will work for any situation that someone needs to use the up arrow, down arrow, left arrow, and right arrow. [CODE] #include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> #include <conio.h> #include <windows.h> #include <stdio.h> #define … ![]() | |
Why is my score corrupted??? #include <iostream> #include <cstdlib> using namespace std; int main() { string names[10]; int score[10]; for(int scores = 10; scores >= 0; scores--) { cout << "What is your score? "; cin >> score[scores]; cout << endl; } int swapHolder = -1; int ten = 10; … | |
I am programming a number of students and quiz questions and correct answers program for my school's programming II class. I have an ok knowledge of C++, but I cannot understand the reason why my code does not work. I have created an integer of num of students, I asked … | |
#include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> #include <cstdlib> using namespace std; int main() { string names[10]; int score[10]; for(int scores = 0; scores < 10; scores++) { cout << "What is your score? "; cin >> score[scores]; cout << endl; } int swapHolder = -1; int … | |
I don't understand what I am doing wrong. Can anyone help me please??? Code blocks are created by indenting at least 4 spaces ... and can span multiple lines using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace chapter_5_c_sharp_array { class Program { static void Main(string[] args) { int x; … | |
What did I do wrong? Can anyone please explain to me so I can learn? [CODE] #include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> using namespace std; class Distance { private: int length; public: Distance(int length = 0); int operator *(Distance My_Trip); int trip_length; }; int Distance::operator *(Distance … | |
Hi everyone! =) Since my teacher can't help me out or doesn't respond when his hours say he's in his online office, I need some help. I am coding Tetris; and I have to say I'm doing a decent job so far. I just need help with constant movement. =/ … | |
header1.h [CODE] #include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> #include <Windows.h> #include <conio.h> using namespace std; int gotoxy_object(int x, int y) // your object { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); COORD point; point.X = x-1; point.Y = y-1; SetConsoleCursorPosition(hConsole, point); return SetConsoleCursorPosition(hConsole, point); } int gotoxy1(int x, int … | |
Re: couldn't you go kbhit_()?? | |
![]() | Re: generate random numbers from 1 to 9??? easy. make a random number generator from 1 to 9 then make an int number_array[10] and have the arrays = random numbers. |
Re: What is your program basically supposed to do???? | |
Re: [CODE]int stock; Item(string newName, double sale,double price, int amount) { name = newName; salePrice = sale; buyPrice = price; finalPrice = salePrice * (1 + (salesTax / 100)); stock = amount; } Item() {} bool operator==(Item i) { if(i.name == name && i.salePrice == salePrice && i.buyPrice == buyPrice && … | |
Re: instead of doing [CODE]pay * (pow((1+rate),(term))-1)/(rate*(pow((1+rate),(term))));[/CODE] why don't you break it up in segments and then combine them together. Here is a math program that I used which might be able to help you code. [CODE] float the_work(float pie_over_180, float angle, float force, float meters, float kinetic_friction) { float Angle_with_pie_over_180 … | |
Re: endl, in my opinion, helps skip lines in the code. It also helps organize code because when you cin >> x_integer; cout << endl; or cout << endl << endl; (skips 2 lines) can make your code look cleaner and more organized. In my opinion anyways. | |
Re: Is this what you mean?? [CODE] #include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> using namespace std; int main() { int n = 100; int m; m = n; for (int i = 0; i < m; i++) { cout << "Your number is: " << i << … | |
My code has a successful build, but when I run it and type in my 5 numbers, it breaks. Any clue as to how I can fix it??? Much help will be appreciated. [CODE] #include <iostream> #include <sstream> #include <string> #include <ctime> #include <cmath> #include <math.h> #include <algorithm> using namespace … | |
Re: wait?? So what is your program supposed to do??? | |
My teacher assigned the class this: Create a simple Game Loop for the game Mastermind. (Search the Internet to refresh your mind on how Mastermind is set up.) Have your computer generate a random 5 digit number, as a string. Then the user must guess the number. Using the code: … | |
Re: So a class is just like a struct??????? | |
Re: you can use this string letters[5]; float numbers[5]; then ask a question like enter a string and cin >> letters[0] cout << "type a string? (without spaces) "; cin >> letters[0]; cout << "type a number. "; cin >> numbers[0]; | |
Re: if you're counting from 0 to whatever then couldn't you make an if else statement look it asks if counter == 0 and if counter2 == 0 then you make an array or whatever or even vector<int> multiples and just do multiples.push_back(counter2); ????? | |
I am making a program for my week 1 programming II class. The assignment is... Create a structure for a classroom. Make sure it includes the following: Room Number, Lecture Name, List of Students, Number of chairs, Window (Yes/No), Projector (Yes/No), Available(Yes/No). Instructions: • Create functions that allow you to … | |
Re: Why are you nulling char* parr[maxStrings] = { NULL, NULL, NULL, NULL, NULL }; ????????? | |
This is code for the slope intercept formula y = mx + b I am supposed to find the slope (y2 - y1) / (x2 - x1) and have the user input the b for the y = mx + b in my program. Once the user does that I … | |
| |
Re: I thought this was cool so I put it in my code. For me, console_handle is in red. Error: argument of type "HANDLE" is incompatible with parameter of type "HWND" | |
Re: can you copy your code, paste it on here. then highlight it and click the (CODE) button??? that puts it in code like visual studios has it. | |
Good evening all. I have a quick quick problem in my code. The build is successful but my debug shows up the errors: First-chance exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. Unhandled exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. The program '[9888] … | |
In my math programming class I have an assignment to find the slope intercept formula (y2 - y1) / (x2 - x1) which is the m of the formula y = mx + b. I have to find 2 slope intercept equations and make an if-statement or multiple if-statements to … | |
This is code for the algebraic slope formula (y2 - y1) / (x2 - x1). I need help. My error is: Uninitialized variable formula2 is being used without being initialized. Can anyone help me??? [CODE]#include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { int formula1[2]; … | |
Re: Why not just make a function out of it? like enter address, cin >> address, enter name, cin >> name and stuff like that??? | |
This is code for generating a blank window for direct X. When I build this code i get the errors.. 'Chapter1_DirectXWindow.exe': Loaded 'C:\WINDOWS\System32\uxtheme.dll', Cannot find or open the PDB file The program '[2536] Chapter1_DirectXWindow.exe: Native' has exited with code -1 (0xffffffff). The code is successful. Can someone please check it … | |
This is code for building a white window in direct X. The problem is, when I debug, I get this error. 'Chapter1_DirectXWindow.exe': Loaded 'C:\WINDOWS\System32\uxtheme.dll', Cannot find or open the PDB file The program '[2536] Chapter1_DirectXWindow.exe: Native' has exited with code -1 (0xffffffff). [CODE]#include <Windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT message, … | |
Re: math.h is a library. So you would have to make your own library and just use that name. It is possible to make it faster, depending on what you use, but math.h and cmath has square roots, order of operations,some trig and calculus I think. | |
Is there any way a user can input numbers into an array like you can in c++??? Or strings for that matter???? | |
Re: Can you copy paste your code on here??? And once you do that can you highlight it and click the CODE button so it puts it into the code??? I can try and help you out if you do that. I took programming one and it was in C++. I … | |
Re: @ Lusiphur: I am a beginner as well and I am also learning c# by myself now. I have a book on ASP.Net 3.5 and Silverlight 3 as well. i really think that these guys that have typed out the code and posted it on here help out a lot. … | |
I am trying to make a simple calculator for my code and I wanted to know, how can I have the user input a number like c++ cin >> number; and then just have my math functions do the rest. I have this so far... [CODE] public static void Main() … | |
I have only 2 errors in my code. Both of them are on Line 123. The errors are: 1>c:\users\zvjezdan\documents\visual studio 2010\projects\week5_math\week5_math\program.cpp(124): error C2804: binary 'operator *' has too many parameters 1>c:\users\zvjezdan\documents\visual studio 2010\projects\week5_math\week5_math\program.cpp(124): error C2333: 'main::Vector3::operator *' : error in function declaration; skipping function body This is code for finding … | |
Re: Could you copy paste your code and just wrap it around so we can see it and we could help you out in more depth?? | |
This is a class that uses a vector to store 3 points (x,y,z) so i can find the distance from each of the points. Can anyone help me?? [CODE]#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <vector> #define inline using namespace std; int main() { class Vector3 { public: … | |
The problem in my code lies somewhere in the Class2DPoint object1 = new Class2DPoint(num[0], num[1]); Class2DPoint object2 = new Class2DPoint(num[3], num[4]); part of the code and there is a problem in the object1 = object1 * object2; and public Class2DPoint() { this.x = 0; this.y = 0; } I only … ![]() | |
Re: What does this supposed to do??? Make a physical 3d character on the screen??? Sorry, im a noob when it comes to 3d | |
I need help with my distance formula. pow is apparently not in cmath or math.h. Since I am a beginner in C++, I need some help with the distance. I did the floaters and everything, well I used a book. Beginning Math and Physics for Game Programmers by Wendy Stahler. … | |
I am making Yahtzee and this is what I have so far. This is my ThingsThatNeverChange.h header [CODE]#include <iostream> #include <iomanip> #include <cstdlib> #include <string> #include <algorithm> #include <ctime> #include <windows.h> #include <conio.h> #include <dos.h> #include <math.h> using namespace std; char savenum = 'y'; char rollAgain = 'y'; int i; … | |
I am in need of dire help. My Yahtzee game is due in class on Wednesday. My computer recently crashed and deleted my visual studios 2010 with all of my Projects that I have done. Luckily I had a back up file on my flash drive. Sad thing is though, … |
The End.