1,443 Posted Topics

Member Avatar for bombay1982

First, use printf instead of println Then check out this link for [URL="http://sharkysoft.com/archive/printf/docs/javadocs/lava/clib/stdio/doc-files/specification.htm"]format specifiers[/URL]:

Member Avatar for bombay1982
0
387
Member Avatar for Catalyst.X

3400 lines of code is a bit much to tackle all at once. Why don't you take a section (let's say one function), separate it into a new .VB file all by itself, then refactor that into smaller functions grouped by functionality THEN optimize the code. Once you're looking at …

Member Avatar for thines01
0
212
Member Avatar for morred
Member Avatar for Sluazie

Let me see if I understand. The first number is a RANDOM number between 25-100. That number will be used to create THAT NUMBER of random numbers between 1-1000. Then you need the index of the smallest number Then you need the index of the largest number Then you need …

Member Avatar for WaltP
0
125
Member Avatar for Pats2KDynasty
Member Avatar for thines01
0
116
Member Avatar for shandoosheri

You can use a loop with an integer or double and use .ToString().PadLeft(n, '0') if you need the last n digits incremented. [QUOTE=shandoosheri;1695304]Hi every one I have this url [url]www.websiteaddress.com/0010001[/url] and i want to keep counting on it like it becomes [url]www.websiteaddress.com/0010002[/url] [url]www.websiteaddress.com/0010003[/url] and so on and i want all …

Member Avatar for thines01
0
114
Member Avatar for PapaGeek

Do you have the original source code? If so, change the extension to .cpp, add the source to your project, make sure you're using warning level 4 and re-compile. After you fix all of the (now-known-as) bugs, you'll be finished.

Member Avatar for PapaGeek
0
1K
Member Avatar for Dakot

In this example, you only put a few even numbers into the new array, but you're printing a TOTAL amount of numbers not just the even ones. When your nPozitive is delcared on the stack (and not initialized), it can have ANY values in it.

Member Avatar for Dakot
0
155
Member Avatar for jackmaverick1
Member Avatar for zing14
Member Avatar for jon4321
Member Avatar for jon4321
0
116
Member Avatar for smash92

On the surface this looks like it will work, but I (personally) would put all questions outside of the Average class. Are you supposed to have an array of something OTHER THAN the integers in the class?

Member Avatar for JamesCherrill
0
503
Member Avatar for compzets

How about this?: [CODE] int gcd(int x, int y) { if ((x % y) == 0) return y; return gcd(y, x % y); } [/CODE]

Member Avatar for thines01
0
171
Member Avatar for Johnnyj01
Member Avatar for jnmisa

WaltP, I think this is just a code snippet. jnmisa, you can remove the use of the bool "ValidateDegreeValue" and put the TryParse iside the "if" statement if you want.

Member Avatar for jnmisa
0
172
Member Avatar for Stpdoug

You will need to read that variable as a string and then convert it to an integer.

Member Avatar for Stpdoug
0
180
Member Avatar for skylinedrifter

[url]http://www.daniweb.com/software-development/cpp/threads/394152[/url]

Member Avatar for Clinton Portis
0
182
Member Avatar for skylinedrifter
Member Avatar for thines01
0
146
Member Avatar for karimnouh

You will need to send the files one at a time. using System.IO; using System.Net; Use the Directory.GetFiles() method to find the files you want to send. Use a WebClient and the .UploadFile() method to send the files to the remote server. There are other options for uploading, but this …

Member Avatar for thines01
0
182
Member Avatar for farshadak2004

As long as your key in the Dictionary/Hashtable is unique, it doesn't matter. Open the database, loop through the queried data, Add() the data to the Dictionary<string, string>. Close the database.

Member Avatar for thines01
0
89
Member Avatar for noobprogrammerr

Generically speaking, there are at least two methods of doing what you want. Here is a neutral example of how it can be done. You should be able to see how to modify your code when you see these two examples. If you are still (really) having problems, let me …

Member Avatar for thines01
0
124
Member Avatar for infantheartlyje

Are you going to keep it flat-file based? How many users? Why c++? What have you written so far?

Member Avatar for thines01
0
240
Member Avatar for amras123

You are mixing "a" and "ktr" in a manner that doesn't make sense. Did you mean for "a" to start at 1 and go to -1?

Member Avatar for JamesCherrill
0
163
Member Avatar for adnanshahid89
Member Avatar for Saima_Khan

[Cat is out of the bag] Did you wrap the value for [Task Name] in single quotes? Also, what is your data type of [Completion Date]? Is it a string (varchar)? Is it a DateTime?

Member Avatar for thines01
0
140
Member Avatar for notSo smartGuy

I would suggest using a List<string> to store your rows. You could also create a CLASS to hold your rows and store the rows in a List<CLASS> or a Dictionary<string, CLASS> where the key to the dictionary is the student ID. If you're into creating classes, it will make keeping …

Member Avatar for thines01
0
324
Member Avatar for Panathinaikos22

...nore really sure with your version of ASM, but I use ORG 100h because I make .com files.

Member Avatar for gizerakos
0
84
Member Avatar for shers

How much do you know about Web Services now? If you are building the WS, you can design the interface to take the types of data you want. If you are just consuming the WS, you will need to adhere to the interface provided to you. If you are using …

Member Avatar for thines01
0
135
Member Avatar for zekstein

Check out spawnl() [url]http://qnxcs.unomaha.edu/help/product/neutrino/lib_ref/s/spawnl.html[/url] [url]http://www.cplusplus.com/forum/windows/1960/[/url]

Member Avatar for thines01
0
105
Member Avatar for FELIGO

...or... [CODE] using System; using System.Linq; namespace DW_370908 { class CDW_370908 { static void Main(string[] args) { int[][] int_arr_arr = new int[][] { new int[] {2,190}, new int[] {7,101}, new int[] {1,100}, new int[] {3,100}, new int[] {9,100} }; int[][] int_arr_arr2 = int_arr_arr.OrderBy(i => i[0].ToString()).ToArray(); int[][] int_arr_arr3 = int_arr_arr.OrderByDescending(i => …

Member Avatar for thines01
0
2K
Member Avatar for Daniel85

If you are running this from the debugger (or if the file is not in the same directory with the executable), you might need to give the full path of the file.

Member Avatar for Daniel85
0
227
Member Avatar for lavenzo

The type of project you create will depend on where and how the DLL will be used. If you are going to continue to use MANAGED code, there is really no need to convert the C# to C++, just use the DLL and call its functions. If you are converting …

Member Avatar for thines01
0
2K
Member Avatar for berwick53

If you're still interested in this one, I've always found specifically naming the columns will prevent problems with SQL Server [CODE]"INSERT INTO tblUsers (USERNAME, PASSWORD) VALUES(@USERNAME, @PASSWORD)" [/CODE]

Member Avatar for thines01
0
135
Member Avatar for deeps2_daniweb

1) Make a class that has ALL of the employee details EmployeeName, EmployeeNumber, Department, Age, GrossSalary, NetSalary 2) create (in the class) a method that returns a string that contains ALL of the employee details (delimited by {tab or comma}) 3) Read the Employee.txt into an array, list, vector of …

Member Avatar for raptr_dflo
0
2K
Member Avatar for ramy84

It really depends on the layout of your input file and how you want to parse it. Let's say it is a numbered list, tab delimited. [CODE] 1 candy 2 beer 3 peanut butter 4 crackers [/CODE] ... you can use the code to put the data into a Dictionary …

Member Avatar for thines01
0
180
Member Avatar for iXmerof

Are you saying you have a class that you want to place into a Hashtable, the retrieve elements of that from the Hash?

Member Avatar for iXmerof
0
183
Member Avatar for awesome_cool

C++ is such a rich language that you'll never "finish" with it. Even if you move to another language, like C#, you'll discover things you [I]could have[/I] done with C++ you'll go back and polish your old skills. Even with c++, there's still MFC and CLI and a host of …

Member Avatar for thines01
0
529
Member Avatar for babyhuyx

So you're saying you want to parse either the given word OR the words in the dictionary by the length of 3,4,5,6 and make new words for comparison?

Member Avatar for raptr_dflo
0
175
Member Avatar for gani_2

Check out System.Xml.Linq Use the XDocument.Parse() method ...or the XDocument.Load() method [CODE] Imports System.IO Imports System.Xml.Linq Module Module1 Sub Main() Dim xd As XDocument = XDocument.Load("c:\science\DaniWeb\DW_392100\DW_392100.xml") For Each node In xd.Elements("Table").Nodes Console.WriteLine(node) Next 'fileIn.Close() End Sub End Module [/CODE]

Member Avatar for thines01
0
4K
Member Avatar for berwick53

When I use XML, I use the System.Xml.Linq namespace. It seems to be easier. [CODE] using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace DW_393489 { class Program { static void Main(string[] args) { XDocument doc = XDocument.Load("c:/science/DaniWeb/DW_393489/XMLFile1.xml"); List<XElement> lstElements = doc.Descendants("SYMBOL").ToList(); lstElements.ForEach(xe => Console.WriteLine(xe.Attribute("Code").Value)); } } } [/CODE]

Member Avatar for thines01
0
92
Member Avatar for branflake
Member Avatar for thines01
0
149
Member Avatar for C++isC++
Member Avatar for lele07060

[CODE] public class Asterisk { public static void main(String[] args) { for (int i=5; i>0;i--) { System.out.println(""); for (int j=1; j<=i;j++) { System.out.print("*"); } } //System.out.println("*"); } } [/CODE]

Member Avatar for thines01
0
123
Member Avatar for jerox

look up strtok() for splitting strings. /*It's not the prettiest thing you will ever see*/

Member Avatar for jerox
0
141
Member Avatar for RenanLazarotto

I made a few assumptions about what you actually want, but this will give you somewhat of a start: [CODE] using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text.RegularExpressions; namespace DW_392451 { class CDW_392451 { static void Main(string[] args) { string strURL = "http://www.daniweb.com/software-development/2"; string strBaseImageLoc = …

Member Avatar for thines01
-1
153
Member Avatar for kshahnazari
Member Avatar for thines01
0
131
Member Avatar for ankit.4aug

It is the same as the scope of where the class is declared (subject to its visibility). [url]http://en.wikipedia.org/wiki/Method_(computer_science[/url]) [url]http://en.wikipedia.org/wiki/Scope_(programming[/url])

Member Avatar for thines01
0
104
Member Avatar for voidyman

Take out the space (unless you are looking for lines with just one space) ^$ So, given a file called test.txt, JUST the sed part would be: [CODE] sed '/^$/d' test.txt [/CODE]

Member Avatar for voidyman
0
938
Member Avatar for abshah

When you compile, do you have the option to pack your structures on a 1-byte boundary? In my old Microsoft compiler, I could use /Zp1 ...otherwise, it would use the default size for every structure that went across the network.

Member Avatar for abshah
0
481
Member Avatar for Awais Ali
Member Avatar for thines01
0
68

The End.