- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
14 Posted Topics
Re: Yeah your code is very long, thanks for the problem :) Why use so many for loops cant you do it with only THis is what I did [CODE]#include <iostream> #include <string> using namespace std; int main() { int num = 10; while (num !=0) { for(int i = 0; … | |
What does int* resizeArray do that int resizeArray doesn't, what' the deference? And why do I delete nArray, and not newArray? [CODE]#include <iostream> using namespace std; void printArray(int* nArray,int size) { // code printing array } int* resizeArray(int* nArray, int oldsize, int newsize ) { int* newArray = new int[newsize]; … | |
Below is the code I wrote, for taking the arrow key imput, just wanted to share it and get some feedback thanks :) [CODE]#include <iostream> #include <conio.h> using namespace std; int main() { int number = 0; int number2 = 0; while(true) { int arrow = getch(); if (arrow == … | |
I love this programme :P [CODE]#include <iostream> #include <string> using namespace std; char lowerCase(char input0 = 0); char upperCase(char input1 = 0); int main() { char character = 0; while(true) { cout << "Enter a Character to change case: "; cin >> character; cout << endl; if(character > 64 && … | |
:) My mind went blank for a bit and I couldn't figure out such a simple programme. But then I had a shower and all was well :) [CODE]#include <iostream> #include <string> #include <cmath> using namespace std; int factorial(int i = 1); int main() { int num = 0; bool … | |
Why cant I pass variables into a void printPoint function, and not have to return a float ave. I tried just printing the coordinates but I got too errors. so my function looked like this [CODE]void printPoint(float x , float y, float z){ cout << " < " << x … | |
Well I wrote this programme, hoping what I wrote is a lenear sorting algorithm if it's not pls tell me :-O [CODE] #include <iostream> #include <string> using namespace std; int main() { int a[10]; int num = 0; int number = 0; cout << "Enter 10 int..." << endl; for … | |
It doesn't compile, why? [CODE]#include <iostream> #include <string> using namespace std; int main() { for(int cnt1 = 0, int cnt2 = 10; cnt1<10; ++cnt1, --cnt2) { cout << cnt1 << "--------Hello!---------" << cnt2 << endl; } system("PAUSE"); }[/CODE] | |
Re: First you might not have declered EPSILON secondly why are you subtracting n1 and n2? Isn't n1 and n2 the resluts of a/b and c/d? if you want to test if they where equal [CODE] if (n1 == n2) { EPSILON = true; }[/CODE] and you cant return this (... … | |
I wrote this programme but what two numbers you choose exit it? can you guess just by looking? Because I can't :( [CODE]#include <iostream> #include <string> using namespace std; int main() { bool aHo = true; int a = 0; int b = 0; while(aHo) { cout << "Enter Number … | |
[CODE]#include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; void RandomArrayFill(int* array, int size) { //int* array = new int[size]; cout << "Creating and filling the array with integers..." << endl; for(int i = 0; i< size; ++i) { array[i] = rand() % 101; } cout << "Array … | |
Okay I want to write a programme that saves a screen shot every second, but I don't want to use any print screen function: This is how I'd go about it, with my limited knowledge: first I'd calculate the resolution of the screen, and then loop through all the pixels … | |
Hi every one :) Well I wrote this code for deleting the pointers, and it compiles and runs. But at the end of the run it comes up with an Debug Assertion failed. WHY??? [CODE]#include <iostream> using namespace std; int main() { bool boolVar = true; int intVar = 50; … | |
Re: Well I wrote the following code and I decided to delete the pointers at the end, well it compiles alright, but when I run it at the end it gives me an Debug Assertion Failed error. What's going on :( #include <iostream> using namespace std; int main() { bool boolVar … |
The End.