3,183 Posted Topics

Member Avatar for jd3189

> We were taught about the var property but for some reason were told to try amd stay away from using it, ironically. Not really sure of the reasoning behind that. `var` is something of a controversy. Some folks think it should never be used when optional because it hides …

Member Avatar for deceptikon
0
3K
Member Avatar for Suzie999

Click the Chat button on the bottom bar. This will open the chat window and reset your pending chats count. It will also turn off the inline chat popup until you receive another chat in your chat box.

Member Avatar for pritaeas
0
278
Member Avatar for XP78USER

They changed the Recycle Bin icon? That's my favorite feature, and the only reason I use Windows! That's it, I'm officially and irreversably moving to Minix. This travesty cannot be be reconciled. Who does Microsoft think they are? Geez!

Member Avatar for Lardmeister
0
361
Member Avatar for Wojciech_1

> You seem not to get the point Dani The point is not lost. I understand exactly what you want, and I'm sure Dani does as well. > why not make who voted visible (but only to post author)? Let's attack this from another direction. Why do you *need* to …

Member Avatar for Reverend Jim
-4
337
Member Avatar for selam kassu
Member Avatar for Nataliya_1

If the sample of the file you presented is accurate, then it's not a binary file, it's a variant of CSV. `fread` with that structure won't work since the file has to be parsed as a comma separated format. For it to work, the file would need to be created …

Member Avatar for Schol-R-LEA
0
216
Member Avatar for happygeek
Member Avatar for Meftah

That code is definitely C#. Since the question did not ask about conversion to C, I've moved the thread to the C# forum so that the resident experts have a better chance of seeing and answering it.

Member Avatar for deltaitservices
0
177
Member Avatar for Emma Etigu

`BindingSource` is your friend: private BindingSource _bs = new BindingSource(); ... // Initialize DGV _bs.DataSource = ds.Tables("Customer"); dataGridViewCustomers.DataSource = _bs; ... // Filter DGV _bs.Filter = string.Format("customerID LIKE '%{0}%'", customerID);

Member Avatar for Emma Etigu
0
338
Member Avatar for brandon66

Your dequeue logic has two major problems: 1. It does not take into account updating the `bottom` node. 2. Wherever the node is deleted, the list is terminated with NULL rather than maintaining the structure if there are subsequent nodes. This is a basic single linked list deletion, so you …

Member Avatar for brandon66
0
247
Member Avatar for cokiedork
Member Avatar for Wojciech_1

That's by design. The editor isn't a mere text field, it's an actual text editor supporting Markdown where indentation is significant. If tab moved to the next page element, creating code blocks manually would be tedious at best.

Member Avatar for cereal
-2
859
Member Avatar for Sana_5
Member Avatar for mattyd

> What does it exactly mean to "escape" a string and where does the code for this go? Escaping a string means converting characters that would be treated as special in a query as literal characters. A good example is a single quote. This has special meaning in a query, …

Member Avatar for deceptikon
0
411
Member Avatar for Wojciech_1

> Why you dont want to introduuce new features suggested by me (and not only me)?? You're sending mixed signals. First you want the bugs fixed before adding new features, then you want new features. In both cases, your suggestions have been too vague to act on. In fact, I …

Member Avatar for deceptikon
-5
288
Member Avatar for Tycellent

The problem is that a naive `atoi` like conversion won't work directly with hexadecimal characters because you need to take into account that a-f represent 10-15. That too requires a minor conversion as well to get the values you need. Once you have those values, this formula works to build …

Member Avatar for マーズ maazu
0
298
Member Avatar for Wojciech_1

Alt+s works for me, no shift necessary. I'm also on Windows 8.1. What browser are you using?

Member Avatar for Wojciech_1
0
106
Member Avatar for kayleigh0411

Your `else` clause is missing braces. That only works when the body of the clause has one statement, yet here you have (presumably) three.

Member Avatar for kayleigh0411
0
281
Member Avatar for saxxyblack

Creating controls at runtime is certainly possible. For example: using System; using System.Drawing; using System.Windows.Forms; namespace FormScratch { public class MainForm : Form { private Button buttonAddImage; private FlowLayoutPanel flowLayoutPanelThumbs; private void InitializeComponent() { buttonAddImage = new Button(); flowLayoutPanelThumbs = new FlowLayoutPanel(); SuspendLayout(); buttonAddImage.Location = new Point(13, 13); buttonAddImage.Name = …

Member Avatar for saxxyblack
0
529
Member Avatar for Nikki_1

A continuation would help in identifying a pattern. Presumably, it might look something like this: 1 1 2 2 3 2 3 4 3 4 5 3 4 5 6 4 5 6 7 4 5 6 7 8 4 5 6 7 3 4 5 6 3 4 5 …

Member Avatar for overwraith
0
420
Member Avatar for ddanbe

Hmm. Of the top of my head, I'd say it really depends on what features you plan to support. If there's a huge amount of intersection between the two, I might choose to implement the vector as a composition/specialization of a matrix of 1xN or Nx1. Alternatively, a matrix may …

Member Avatar for mike_2000_17
0
363
Member Avatar for tentrabyte

> i mean the output should be vertical direction Which means what, exactly? Show us an example, because right now each number is output on a separate line, and that looks a lot like 'vertical' to me.

Member Avatar for mridul.ahuja
0
198
Member Avatar for JohnMcPherson

Well, one thing that stands out immediately is C isn't so pretty that it allows commas in a large number. In fact, if you're exceptionally unlucky (which it seems you are), including them will be syntactically correct but semantically bonkers.

Member Avatar for JohnMcPherson
0
221
Member Avatar for Jan Adi
Member Avatar for chilly_peppers

In the south it feels like spring time, it's January, I *like* the cold, and your name is chilly. I ban you for reminding me that I haven't properly had my winter yet this year. Taking bets on how many people will check to see if chilly is *actually* banned …

Member Avatar for XP78USER
2
1K
Member Avatar for akash_6

What do you need help with? What have you done? This is clearly homework, so we need some proof of effort before helping (as per Daniweb rules).

Member Avatar for TekknoDraykko
0
206
Member Avatar for zxz

There are a few problems, and most of them stem from misunderstanding pointers. On line 12 you have this: while(i <= cnt) That's an off by one error. Arrays are 0-based in C, which means if the user enters 3, you're processing the indexes 0, 1, 2, *and* 3 rather …

Member Avatar for zxz
0
243
Member Avatar for tentrabyte
Member Avatar for makungu

All I see is a homework assignment, which violates our rules. Please show us your honest attempt and ask an actual question.

Member Avatar for deceptikon
0
93
Member Avatar for AmritaHasan11

> the best monitor is what you like the best, at a price you can afford Much yes. I'm a fan of Acer LED monitors, personally.

Member Avatar for deceptikon
0
151
Member Avatar for can-mohan

The code looks dicey, especially how you incorrectly delete `cobj` in the first code. What are you really trying to accomplish with this? The class and variable names aren't enlightening as to the underlying design problem you want to solve here.

Member Avatar for can-mohan
0
437
Member Avatar for Habib_7

You've mostly got it: #include <stdio.h> int main(void) { int k = 80; void *p = &k; printf("%p\n", p); // Move forward one byte p = (char*)p + 1; printf("%p\n", p); return 0; } The result of a cast isn't a suitable lvalue, so you cannot use the `++` operator. …

Member Avatar for Habib_7
0
120
Member Avatar for bernardine
Member Avatar for redtribal23

The two primary problems are that head is never updated in `main`, and your output loop never sets `stdPtr` to `stdPtr->next`. Given your description of the problem, as well as syntax errors, I find it difficult to believe that the provided code is the same code that you're executing.

Member Avatar for deceptikon
0
166
Member Avatar for manofprogram

`stdout` and `stdin` are not tied, so the output from `printf` is only guaranteed to be flushed if you print a newline or call `fflush`. In this case, you probably don't want to print a newline, so the only solution is `fflush`: int main () { int i; printf ("Enter …

Member Avatar for deceptikon
0
129
Member Avatar for tgreiner

Agreed with Moschops, but this is still a legitimate question. > When does it become necessary to allocate memory for an array? Typically when the size of the array is unknown until runtime, or the lifetime of an array would be insufficient for your needs (such as returning a locally …

Member Avatar for tgreiner
0
228
Member Avatar for sheenalsingh

This is your homework, not ours. We'll help if you have a specific question, as long as the specific question does not constitute "do it for me".

Member Avatar for mridul.ahuja
-1
165
Member Avatar for PrinceRobinson

> Is it possible to obtain 15 reputation points in your first 15 minutes of registering? Yes. If you catch the eye of one of our heavy hitters in terms of reputation power, you can reach that in one shot (a handful of the top posters have +15 power). Or …

Member Avatar for <M/>
0
260
Member Avatar for <M/>
Member Avatar for DaveAmour
Member Avatar for DaveAmour
0
124
Member Avatar for johans22

> How later on reset all elements back to 0.0? There are a number of ways. One that comes to mind is: v2d.assign(2, vector<double>(3)); This will completely replace the contents of the vectors with default initialized objects. However, that can be troublesome if you have pointers into the original objects. …

Member Avatar for ravenous
0
299
Member Avatar for dennis r
Member Avatar for jnneson
Member Avatar for rvndrdahiya

It's a compiler optimization. Given that string literals are read-only, there's no reason to create two separate instances of the same string literal in memory.

Member Avatar for rvndrdahiya
0
286
Member Avatar for VengefulToast

> I thought of searching the web And what did your web search tell you? Some of your questions are easily answered with a web search, so my answers may be somewhat sarcastic. Where the question is trivially found, I won't even bother. > How to properly override the ostream …

Member Avatar for deceptikon
0
332
Member Avatar for Matt_15

Functions support parameters, which are designed for this exact purpose: int add(int a, int b) { return a + b; } int main(void) { int a = 5; int b = 2; int c = add(a, b); printf("%d + %d = %d\n", a, b, c); return 0; } This is …

Member Avatar for deceptikon
0
257
Member Avatar for Spark_2

That design sounds dicey to me. My preference would be for the main form to manage itself completely, where temporary dialog forms are opened as needed and pass back information objects through properties or events for the main form to own and manage beyond the lifetime of the dialog. For …

Member Avatar for cgeier
0
293
Member Avatar for coolbeanbob

If you show us your code, we can offer advice on improving it. For now, I can only answer your questions. > Does fscanf not work with negatives? It works fine, provided you use a signed format specifier like `"%d"`. > Do I have to read in the entire file, …

Member Avatar for deceptikon
0
172
Member Avatar for sherry ibrahim
Re: help

Please read our [rules](https://www.daniweb.com/community/rules) concerning homework. I'll give you time to ask a more specific question and show your work thus far. Otherwise this thread will be closed as a rule violation.

Member Avatar for deceptikon
0
56
Member Avatar for mariam iqbal

> I humbly apologize and throw myself upon the mercy of the court... I find you guilty and sentence you to ten lashes with a wet noodle. After that, you must endure...THE COMFY CHAIR! Muahahahaha!

Member Avatar for deceptikon
-2
375

The End.