Search found 11 matches

by polyneem
Sun Nov 14, 2010 7:21 pm
Forum: Programming Discussion
Topic: outputing numbers
Replies: 4
Views: 554

Re: outputing numbers

ya it was hex I was looking for, thanks ginto8 and JaxDragon
by polyneem
Sun Nov 14, 2010 7:04 pm
Forum: Programming Discussion
Topic: outputing numbers
Replies: 4
Views: 554

outputing numbers

int a = 0x000001;
how would I printf() this or cout it so it displays as 0x000001?
by polyneem
Sat Jun 12, 2010 7:19 pm
Forum: Programming Discussion
Topic: reading integers from files
Replies: 4
Views: 412

Re: reading integers from files

thank you all for your help, I have it working now
by polyneem
Sat Jun 12, 2010 4:53 pm
Forum: Programming Discussion
Topic: reading integers from files
Replies: 4
Views: 412

reading integers from files

I'm pretty new to the whole c++ scene, and am wondering how to go about reading integers from a text file. I tried the following code, it works fine with chars but not with ints. #include <fstream> #include <iostream> using namespace std ; int main() { int letter ; int i ; //string line ; ifstream r...
by polyneem
Wed May 19, 2010 11:58 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

Re: trouble with code

so I solved it, it might not be the best way but it gets the job done, but how would you rephrase my question, so that I can be more clear next time? int x = 11; int y = 55; int block = 33; bool moving = false; int counting =0; bool blocking = false; do { if (counting < 7) { counting ++; } if (block...
by polyneem
Wed May 19, 2010 11:41 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

Re: trouble with code

never mind, I thank you all for your help, but its too hard for me to explain what I want to do, when I figure it out I'll post what the solution was and then maybe we can create a question to help me explain myself better in the future, I once again thank you all for your time.
by polyneem
Wed May 19, 2010 11:25 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

Re: trouble with code

@Genesis I know about the ++ and -- but previously I was using different numbers and the += was an efficient way to change the number, your code was what I was thinking of changing to, but what the big thing that I am trying to ask is really tough to get across. I'll try explaining it with text inst...
by polyneem
Wed May 19, 2010 10:51 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

Re: trouble with code

well its not homework, dunno why you guys would think so, I don't even take any computer courses in school.
by polyneem
Wed May 19, 2010 10:40 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

Re: trouble with code

who said this is homework?
by polyneem
Wed May 19, 2010 10:39 am
Forum: Programming Discussion
Topic: [solved] trouble with code
Replies: 11
Views: 781

[solved] trouble with code

by looking at the code below you can see that I doing is finding out if a number is a multiple of another number, by either 11 or 13, what I am trying to find out is how to make it so if a blocker number is in between them then to stop going down that path, I'll try to explain what I mean by that be...
by polyneem
Tue May 11, 2010 7:29 pm
Forum: Programming Discussion
Topic: Arrays
Replies: 8
Views: 831

Arrays

what would the best way to sort through an array to find the largest number? int bottle[9] {1,3,2,5,6,2,3,5,3}; //here bottle[4] would be the largest I was thinking about making a for loop, and setting 9 different variables to each number, and changing the variables each time it goes through the loo...