1,857 Posted Topics

Member Avatar for lewashby

It appears to me you're using deprecated functions with the new librairies. Searching the forums for SDL can give you more information.

Member Avatar for tinstaafl
0
272
Member Avatar for chumli
Member Avatar for omar.elbakly.95

Here's one way: void MakeInvTri(int rows, int spaces = 0) { static const char temp[21] = "* * * * * * * * * * "; static const char temp1[21] = " "; if (spaces == 0) { rows *= 2; } if (rows < 0) { return; } …

Member Avatar for Maritimo
0
1K
Member Avatar for newop

Probably one of the easiest ways is by using the constructor: Add these lines to the `Stack` class public Stack() { } public Stack(Stack input) { arr = input.arr; } And use it like this: Stack st2 = new Stack(st);

Member Avatar for tinstaafl
0
167
Member Avatar for alfred.tasic.7
Member Avatar for rela

Firstly, your code as is shouldn't compile. * `fin >> 3;`- makes no sense. You can't can't extract an input stream to a constant value. * `int nof_row_per_mainnumber[3];`- this isn't spelled the same as where you use it, `no_row_per_mainnumber[i]= numberof_rows;` * The initial class block must end in a `;`. …

Member Avatar for tinstaafl
0
265
Member Avatar for aluhnev

First off, your prototypes that take parameters don't have any datatypes just variable names. Secondly, the functions you want to call, are already inside the class. You shouldn't need to declare new ones, just create an object of that class.

Member Avatar for richieking
0
201
Member Avatar for Papa_Don

Not sure if this is the problem, but you sem to be assuming 1-based indexing. Have you tried 0-based indexing of the spreadsheets?

Member Avatar for Papa_Don
0
2K
Member Avatar for amvx86

Feel free to post what you have. I woulkd suggest, though that if the code is lengthy and there are quite a few problems to break it down into several questions instead of one big massive one. This not only keeps the answers focused but also assists other members who …

Member Avatar for amvx86
0
352
Member Avatar for TheGuy831

A conditional that checks the size of the `Lines` property of the textbox should work Dim PageElement As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName(TextBox1.Text) For Each CurElement As HtmlElement In PageElement TextBox2.Text = TextBox2.Text + CurElement.GetAttribute(TextBox3.Text) + Environment.NewLine If TextBox2.Lines.Length = 3 Then Exit For End If Next

Member Avatar for tinstaafl
0
173
Member Avatar for Reverend Jim

It would probably help if the headings on the web page were persistant and didn't scroll off the screen when you scroll down the web page. At least this way the notification would always be visible.

Member Avatar for Dani
0
285
Member Avatar for lithium112
Member Avatar for shahera.arafat

You could use a stringstream. The extraction operator will use the space as a delimiter and you can extract the string, "new", and the number to separate variables.

Member Avatar for tinstaafl
0
142
Member Avatar for Papa_Don

Been along time since I looked at VBScript but here's the link to the [VBScript User's Guide](http://msdn.microsoft.com/en-us/library/sx7b3k7y%28v=VS.85%29.aspx) which should have all the answers you need.

Member Avatar for Santanu.Das
0
2K
Member Avatar for BibhutiAlmighty

Actually if you create a new form1 object in form2 and show it from there, you can access the combobox on form1 even after the form is closed. On a side note, you really should be able to show some code when you ask a question.

Member Avatar for Santanu.Das
0
234
Member Avatar for aluhnev

A couple of other things: * They way you've interpreted the question means that your input number can't be more than 63, since a 64-bit integer(the largest most modern systems will recognize) will max out after that. It makes more sense to raise the input number to the power of …

Member Avatar for Banfa
0
272
Member Avatar for aluhnev

It's because `str` is a C-style char array and the last element is always a string terminator character. So `size-1` will return that character instead of the last character of the string.

Member Avatar for tinstaafl
0
242
Member Avatar for rose_2

Actually Borland C++ 5.02 was released in 1997. Not quite 20 years but pretty darn close. [Code::Blocks](http://www.codeblocks.org/) with the GCC compiler is a pretty good choice, and has the advantage of being cross-platform. This means that you can copy your files over to your new computer if you decide to …

Member Avatar for tinstaafl
0
151
Member Avatar for Joemeister

What is the code doing that is wrong? One thing I've noticed, `f` is of type `FormA` but you're initializing it as a new `FormB`.

Member Avatar for EclipticalD
0
202
Member Avatar for Builder_1

If you research `c++ circular list` you'll find there are quite a few articles/posts/examples available.

Member Avatar for Builder_1
0
424
Member Avatar for Waldis_1

Based on what I can tell from translating your spanish, You're checking if the outstandingloan column is empty, then saying the customer has outstanding loans. I'm wondering if your conditional statement is reversed: If IsDBNull(dr("prestamopendiente")) Then prestamostatus = MessageBox.Show("Cliente no tiene préstamos pendientes. " & vbCrLf _ & "Favor proceder …

Member Avatar for Waldis_1
0
135
Member Avatar for kegs88

Actually `PadLeft` only accepts char not string. Also you need to offset `i` by 3 otherwise the first couple of steps the figure walks in one spot: string head1 = " 0 "; string body1 = "!T!"; string legs1 = "/ \\"; string legs2 = " | "; bool legsShouldPrint …

Member Avatar for kplcjl
0
2K
Member Avatar for jjones0150

You haven't said where the problem is. Assuming it's the regex, you might find it simpler to just validate the string as a number: public bool IsValid(string text) { int temp; return int.TryParse(text, out temp) && temp >=0 && temp <= 100; }

Member Avatar for jjones0150
0
3K
Member Avatar for Margi_1

Two things that should help: * Add `#include "ClassOne.h"` to ClassTwo.cpp(allows you pass a ClassOne object to twoPrintsOne) #include <iostream> #include "classTwo.h" #include "ClassOne.h" using namespace std; ClassTwo::ClassTwo(int c, int d) { m_c = c; m_d = d; } void ClassTwo::printValuesTwo() { cout << "m_c: " << m_c << " …

Member Avatar for tinstaafl
0
302
Member Avatar for Michael_9
Member Avatar for kks21199
Member Avatar for jBat

According to the [help file](http://pubs.opengroup.org/onlinepubs/7908799/xsh/encrypt.html): > The block argument to encrypt() is an array of length 64 bytes containing only the bytes with numerical value of 0 and 1

Member Avatar for tinstaafl
0
158
Member Avatar for Soutta

Basically get rid of the `Redo:` and the `goto`'s,they indicate sloppy programming anyway, and replace them with return statements. Since the return type is Decimal, you'll have to figure out what number you want to use to signify an error. `-1` might do the trick. On a side note, rather …

Member Avatar for Santanu Das
0
173
Member Avatar for rgrgrg

How is it not working? What results are you getting? Also, describing the code is not the same as submitting your code. Submit what code you have, and be specific about what exactly it is doing wrong.

Member Avatar for oussama_1
0
177
Member Avatar for shahab saeed

Aside from the design issues, the `showdata` routine only returns 1 char. You will probably find more success making the return type `char*` and passing the character array as the return data: char* showdata() { return data; }

Member Avatar for tinstaafl
0
146
Member Avatar for aditya_10

You need a method to force the user the press a key before the console is allowed to close. Here's a pretty good [article](http://www.cplusplus.com/forum/articles/7312/) that discusses the various options for that. In your case, since you seem to be using `c`, I would suggest this answer from that article: void …

Member Avatar for tinstaafl
0
157
Member Avatar for bernardo.mclobo

The search function is expecting an object of type `Empleado` not a string. list1->search(Empleado("DUDE010101R0", "Juan Peres")); list1->search(Empleado("AUDE010101R1", "Ana Banana")); Clearing this error brings you to: if(temp->data,data_) { cout<<"Element found " << temp->data; The `if` statement is illegal and `cout` doesn't know how to display `temp->data`

Member Avatar for tinstaafl
0
246
Member Avatar for SK1994

One thing I noticed is that your algorithm is using the literal value of `char` instead of offsetting it by 48 to get the integer value represented by the char.

Member Avatar for tinstaafl
0
346
Member Avatar for Nana_29

Those kind of posts are what happens when you don't care enough to take the time to understand the [Rules](https://www.daniweb.com/community/rules), before you post a question.

Member Avatar for NathanOliver
-1
179
Member Avatar for aluhnev

A binary search basically divides the collection in half, whichever half conatins the searched for item, that part is split in half again, and so on until only 1 item is left that equals the search term or the last 2 items that the search term falls between. A binary …

Member Avatar for tinstaafl
0
153
Member Avatar for The-noob
Member Avatar for bensila4

You will probably want to use a a container like a map which will take key/value pairs. The two letter combination is the key and the value is the count.

Member Avatar for tinstaafl
0
111
Member Avatar for Vincent_5

Odd when I run your code, the only problem I find is the phone, being stored as a number means that it's displayed using scientific notation. Otherwise all the other data is displayed as entered. On a side note, create_account should be an external function that passes the data to …

Member Avatar for tinstaafl
0
385
Member Avatar for Jinxx

Your main problem is not having a loop to read through the file. For storing the totals a `map<string, int>` would work well. Read the file storing the totals in a map object. Now you can display whichever total is required. A simple menu would work well for that.: #include …

Member Avatar for tinstaafl
0
809
Member Avatar for game4tress
Member Avatar for tinstaafl
0
2K
Member Avatar for johnt68

Here's one way that uses on the fly searching: private void textBox1_TextChanged(object sender, EventArgs e) { foreach (ListViewItem item in listView1.Items) { //Selected = true, won't show until the listview has focus, but setting it to true puts it in the //SelectedItems collection. if (item.Text.ToLower().StartsWith(textBox1.Text.ToLower())) { item.Selected = true; item.BackColor …

Member Avatar for keskin
0
4K
Member Avatar for aluhnev

Your first step would to use the date property of the onDutyRecords instead of a separate DATE object. This will put the data for one line in one struct object. Something like this should work: struct onDutyRecords record; infile >> record.date.day >> record.date.month >> record.date.year; infile >> record.name >> record.sunshine …

Member Avatar for tinstaafl
0
476
Member Avatar for jBat

I think you're problem is opening the file in two modes at the same time. Try opening the stream one mode at a time and closing it before you want to switch modes.

Member Avatar for jBat
0
823
Member Avatar for iConqueror

This[ Wikipedia Article](http://en.wikipedia.org/wiki/Bridge_pattern) offers a pretty explanation with diagrams and code examples that show what is meant by separating the interface from the implementation.

Member Avatar for tinstaafl
0
184
Member Avatar for rathiikk

Assuming you mean that you don't want a gap in the numbering. One way would be to loop through all the rows from the row you removed to the end and decrease the serial number by 1, for each row that's left

Member Avatar for tinstaafl
0
107
Member Avatar for sahil_4

Set the last element plus one to a value that won't be entered. For instance, if the values will all be positive, -1 will work. When you loop through the values to display them, exit the loop when you reach this value.

Member Avatar for rubberman
0
204
Member Avatar for rogger.thatylian

What you probably want is a Hex Editor, which will read any file and display the data in hexadecimal,the format you've shown you want, and in ASCII. A good one will let you export the data as hexadecimal to a text file.

Member Avatar for Hiroshe
-1
330
Member Avatar for Tycellent

It seems to me that you either need a default constructor for the `Adventure` class or initialize it according to the existing constructor.

Member Avatar for tinstaafl
0
882
Member Avatar for Santanu Das

This should get you started: [How to: Host Controls in Windows Forms DataGridView Cells](http://msdn.microsoft.com/en-us/library/7tas5c80.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1)

Member Avatar for tinstaafl
0
60
Member Avatar for circuit009

The End.