Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 500
Search took 0.12 seconds.
Search: Posts Made By: OpenLoop
Forum: C++ Mar 5th, 2009, 8:16 PM
Replies: 7
Views: 1,547
Posted By OpenLoop
Re: How to make this simple program repeat?

There's multiple types of loops in C++, the most common are for loops, and while loops.

For loops are mostly used when a counter is involved:

for (int i = 0; i < 10; i++)
{
//do stuff here. This...
Forum: Coder's Corner Lounge Mar 1st, 2009, 12:51 PM
Replies: 72
Views: 2,227
Posted By OpenLoop
Re: Just curious... How old are you all?

26, as of last Sunday. Man I'm getting old... It feels like yesterday I was 22
Forum: C++ Mar 1st, 2009, 7:46 AM
Replies: 2
Views: 191
Posted By OpenLoop
Re: can't find missing ";"

use ; instead of , inside the for loop : for(int i=0;i <20;i++
Forum: C# Feb 21st, 2009, 4:58 PM
Replies: 12
Views: 2,834
Posted By OpenLoop
Re: Using the StreamReader Class

Multiple things that you're doing wrong:
- If you need to access a single character in a scring, use a subscript. (e.g myString[3])
- If you're looking for a specific character in a string, use...
Forum: C# Feb 21st, 2009, 2:39 PM
Replies: 12
Views: 2,834
Posted By OpenLoop
Re: Using the StreamReader Class

For starters, you're reading the line twice: once inside the while condition, and again inside the loop itself. So you're only reading every other line
Forum: C# Feb 20th, 2009, 5:56 PM
Replies: 12
Views: 2,834
Posted By OpenLoop
Re: Using the StreamReader Class

Here's a parser I wrote to extract specific values from an html webpage, as a part of a larger project. Enjoy.


using System;
using System.Collections.Generic;
using System.Linq;
using...
Forum: C# Feb 19th, 2009, 4:44 PM
Replies: 12
Views: 2,834
Posted By OpenLoop
Re: Using the StreamReader Class

You can read the first line to a string and .split() it into a string[] array, then return the string[0]. Can you post the code you have so far (to read the file)?
Forum: C++ Feb 13th, 2009, 6:21 PM
Replies: 6
Views: 610
Posted By OpenLoop
Re: Need Help with Commit Charge?? Out of control.. :(

Also try adding IFNDEF to your header files to avoid multiple includes.

#ifndef __MAIN__INC_H
#define__MAIN__INC_H
//header code goes here
#endif
Forum: Community Introductions Feb 10th, 2009, 5:39 PM
Replies: 19
Views: 1,535
Posted By OpenLoop
Re: New girl on the block

Welcome to PFO.

java.net??? I must be getting old because I haven't heard of this language before.
Forum: C++ Feb 6th, 2009, 5:36 PM
Replies: 20
Views: 1,287
Posted By OpenLoop
Re: Need help from C++ experts

give the guy a break, it's his second post...
Forum: C Feb 5th, 2009, 10:10 PM
Replies: 6
Views: 402
Posted By OpenLoop
Re: guys, kindly check my program...

Ah typedef, I see now. I use it to define easier struct names usually, but I would much rather see the * next to every pointer definition. You're right though, there is no efficiency gains from my...
Forum: C Feb 5th, 2009, 4:59 PM
Replies: 6
Views: 402
Posted By OpenLoop
Re: guys, kindly check my program...

Well, you got the list mostly working. Now when you go to display a number in display(), make sure it is even:

if (p->x % 2 ==0) //only print even numbers
printf("%d\n",p->x);
p =...
Forum: C Feb 2nd, 2009, 4:57 PM
Replies: 16
Views: 924
Posted By OpenLoop
Re: scan a string from right to left

You can either use a dual counter for loop,

int i, rigthLim=strlen(str) - 1;
for (i = rightLim - 1, j= 0; i >= 0; i--, j++)
{
temp[j] = str[i];
}
or calculate the index on the fly

int i,...
Forum: C++ Feb 2nd, 2009, 7:11 AM
Replies: 20
Views: 1,287
Posted By OpenLoop
Re: Need help from C++ experts

Ultimately, an ID card reader would be best because it minimizes fraud and human error. However, since you're dropping this option, I would switch to an Employee ID number (5 digits, assuming a small...
Forum: Coder's Corner Lounge Feb 1st, 2009, 9:28 PM
Replies: 6
Views: 361
Posted By OpenLoop
Re: What Next? - Language Wise.

You can write simple games in C# too, using XNA studio (http://creators.xna.com/en-US/downloads).
Forum: C# Jan 31st, 2009, 8:05 PM
Replies: 9
Views: 793
Posted By OpenLoop
Re: var type

What do you mean by var type? are you talking about 'object' ?
Forum: Project Ideas Jan 29th, 2009, 6:06 PM
Replies: 5
Views: 601
Posted By OpenLoop
Re: a program idea

You don't lay out clear specification. How would a button "appear" on a website? why would you use another website to send an SMS? and why would you want to do this in bash script? The last point...
Forum: Visual Basic Jan 28th, 2009, 5:21 PM
Replies: 7
Views: 1,827
Posted By OpenLoop
Re: VB6 If-Then-Else Condition Question

For those, like me, who hate downloading files to look at code, here's the content of the pdf:

If "TorF" = "True" Then
Worksheets("Wrk Accum Table").Range("here").Select
Selection.ClearContents
...
Forum: C++ Jan 28th, 2009, 8:31 AM
Replies: 8
Views: 513
Posted By OpenLoop
Re: storing giant numbers

if you could, please post your fix as a reference for others.
Forum: C# Jan 27th, 2009, 6:40 PM
Replies: 2
Views: 4,943
Posted By OpenLoop
Re: C# Programming for the iPhone

Actually you don't have to pay for the Apple Dev member to put an app on your iPhone. You can test it on up to 100 phones, but once you want to go App store, you have to pay up. Also, you don't need...
Forum: Visual Basic .NET Jan 26th, 2009, 4:26 PM
Replies: 26
Views: 1,271
Posted By OpenLoop
Re: try - catch statements

You successfully fooled me into reading a two years old thread. Sure seeing a post by 'Arevos' should've hinted to the age of the thread, but I guess I can't miss out on endless arguments.
Forum: C# Jan 26th, 2009, 7:02 AM
Replies: 1
Views: 2,332
Posted By OpenLoop
Re: Resizing windows form controls

Play around with the Anchor property of .NET controls. If you set it to "Top, Bottom" the control will resize vertically. If you set it to "Top, Bottom, Left, Right" the control will resize in every...
Forum: C++ Jan 25th, 2009, 11:05 AM
Replies: 8
Views: 459
Posted By OpenLoop
Re: can u help me!!

Yes I can, but I won't. If you started writing this, and showed some effort, then we will help you.
Forum: C++ Jan 25th, 2009, 9:58 AM
Replies: 8
Views: 513
Posted By OpenLoop
Re: storing giant numbers

Look into big number libraries, like GMP (http://gmplib.org/).
Forum: C Jan 24th, 2009, 12:58 PM
Replies: 8
Views: 512
Posted By OpenLoop
Re: Linking error

Here's a step by step on how I got it to work:
- Open VS 2008 and create a new project by selecting Other Languages->Visual C++->General->Empty Project
- In you new project, the Solution Explorer...
Forum: C Jan 24th, 2009, 11:59 AM
Replies: 8
Views: 512
Posted By OpenLoop
Re: Linking error

Show us your header file code, and the code where you include it, and the actual linker error. Maybe we can help you better then.
Forum: C++ Jan 24th, 2009, 11:52 AM
Replies: 19
Views: 1,396
Posted By OpenLoop
Re: What are colons used for?

You're right, since I'm referencing a pointer to the object. I wrote the code on the fly.
Forum: C++ Jan 24th, 2009, 7:15 AM
Replies: 19
Views: 1,396
Posted By OpenLoop
Re: What are colons used for?

Colons in C++ can also be used for inheritance and to indicate access modifiers in class:

#include <iostream>
#include <string>
using namespace std;
class Word
{
public: //access modifier (public,...
Forum: JavaScript and Client-Side Browser Scripting Jan 23rd, 2009, 7:01 AM
Replies: 1
Views: 379
Posted By OpenLoop
Re: Firefox Temporary Lockup

Looks like these guys had this discussion before (http://www.ozzu.com/programming-forum/javascript-sleep-function-t66049.html). It appears the solution is to use he setTimeout()...
Forum: Other Programming Languages Jan 22nd, 2009, 5:05 PM
Replies: 5
Views: 829
Posted By OpenLoop
Re: Cobol numbers question

I have working production code that moves a PIC S9(09)V99 COMP-3 number to PIC 999999999v99 for display purposes. It takes simply drops the sign because the picture of the receiving field is not...
Forum: C# Jan 22nd, 2009, 4:47 PM
Replies: 2
Views: 431
Posted By OpenLoop
Re: Database with C#

Your question is ambiguous.
Are you inquiring about how to make a search function?
In this case, given that you had to deal with 36 queries already, making a search function would not be difficult...
Forum: Other Programming Languages Jan 22nd, 2009, 10:43 AM
Replies: 5
Views: 829
Posted By OpenLoop
Re: Cobol numbers question

I believe if you move it to an unsigned field(from a PIC S9(9) field to PIC 9(9)), Cobol will convert it for you
Forum: C++ Jan 21st, 2009, 4:56 PM
Replies: 7
Views: 344
Posted By OpenLoop
Re: Need help with looping password input 3 times.

Here's one way to do it. Put the password check code in a function, and call that function 3 times or until you get a correct password.
There are other ways to do it, and many shortcuts to take. But...
Forum: C++ Jan 21st, 2009, 6:31 AM
Replies: 9
Views: 578
Posted By OpenLoop
Re: C++ related problem

@Chris: you are missing the point of a static variable. You should NOT set it in the constructor because it should NOT vary by instance. It would stay constant across all instances of the class....
Forum: Java Jan 20th, 2009, 8:20 PM
Replies: 7
Views: 500
Posted By OpenLoop
Re: Multiple Objects being drawn simultaneously

Almost everything in your class is defined as 'static'. Those variable are class variables, not object variables. In other words, they will not be copied for every object, but will stay static across...
Forum: Coder's Corner Lounge Jan 20th, 2009, 8:11 PM
Replies: 43
Poll: Spam on PFO
Views: 1,856
Posted By OpenLoop
Re: Spam on PFO

I completely agree, especially with the third option. And if it is not possible for new members only, turn off picture posting all together for the time being. How often do we legitimately need to...
Forum: Show Off Your Open Source Projects Jan 20th, 2009, 8:04 PM
Replies: 9
Views: 617
Posted By OpenLoop
Re: XboxSpirit.com has launched! Please review!!

I would give it a 6/10. First impression, too static, need moving graphics, rss feeds, links to news on well known websites. Gamers like cool looking eye candy (flash content, javascript...
Forum: Community Introductions Jan 20th, 2009, 7:57 PM
Replies: 12
Views: 652
Posted By OpenLoop
Re: Being me the only way I know how

@google_girl: welcome to PFO. I see you have great enthusiasm for programming, but taking in so many languages in record time might not be a healthy approach. However, it differs from individual to...
Forum: C Jan 18th, 2009, 10:39 AM
Replies: 3
Views: 347
Posted By OpenLoop
Re: Can you help me with this code?

Here's some tips on making your program easier to look at and debug:
1 - Structure: object code is for computers, but source code is for people. So make sure it is readable by humans by using proper...
Forum: Java Jan 17th, 2009, 9:24 PM
Replies: 12
Views: 496
Posted By OpenLoop
Re: Program terminatng for no reason

I'm pretty sure C# does not care and will let you compare string contents using ==
Showing results 1 to 40 of 500

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC