3,183 Posted Topics

Member Avatar for freedomflyer

> but I have no idea what N0$ for example stands for It clearly stands for the digit '0' in morse code. The dollar sign is just a character in the label name, nothing more. You access it like any other label/variable/identifier. Which assembler are you using?

Member Avatar for deceptikon
0
178
Member Avatar for Doogledude123

> Quick survey, are you guys liking Visual Studio 2012? I've only seen a bit of it over the shoulder of a coworker who's playing with it. There seems to be a "dark" mode that I really like, and the interface is less busy, which is good. There are a …

Member Avatar for deceptikon
1
266
Member Avatar for triumphost

> Why is it safe to use delete[] without getting a crash or something? You consider undefined behavior "safe"?

Member Avatar for mitrmkar
0
178
Member Avatar for m20072
Member Avatar for m20072
0
673
Member Avatar for sarah.mathieson.7

> `for (i = 0; i < gsize_ptr; i++){` `gsize_ptr` is a pointer, you need to dereference it: for (i = 0; i < *gsize_ptr; i++){ Of course, looking at that function definition I see no reason why `gsize_ptr` needs to be a pointer in the first place, unless that's …

Member Avatar for deceptikon
0
249
Member Avatar for Allahwahid

It's totally easy. Take a look: #include <stdio.h> int main(void) { for (int i = 1; i <= 5; ++i) { for (int j = 1, x = 2 * i; j < x; ++j) printf("%.*s%d%s", j>1?0:2*(5-i),j>1?"":"\ ",j<=i?j:i-j%i,j<x-1?" ":"\n"); } } Mwahahahahaha! But seriously, you need a loop for the …

Member Avatar for deceptikon
0
178
Member Avatar for blackcathatesMICE

I think this post should be submitted for the laziest leech student of the year award. How do you sleep at night?

Member Avatar for deceptikon
-3
147
Member Avatar for silvercats

> maybe Discussion of virus implementation is prohibited on Daniweb. But yes, it's possible to physically harm hardware through software, if one is so inclined. > Also "Does the programmer have to control memory manually in Assembly ?" Yes, unless you call into a library that manages memory for you.

Member Avatar for mathematician
0
167
Member Avatar for Vish0203
Member Avatar for drydockedsalt

Chances are pretty good that you won't be able to stop it from being delivered, but out of morbid curiosity, what delivery method are you using? Email, I assume?

Member Avatar for JorgeM
0
94
Member Avatar for Dani

Yummy, I like it. There's a good selection of forums I'm likely to look in a session. While it's a minor thing, being able to mark the forums as read from there with a single click is nice (it's minor from the user perspective, of course. I'm still traumatized by …

Member Avatar for JorgeM
3
179
Member Avatar for Tuna_1

> It is wr,tten enough to solve it besides No, it's not. > besides, if you dont want to reply you dont so it is not neccessary for that replying ;-) Then you don't mind if I just close this thread as being in violation of Daniweb's homework rule? Okay, …

Member Avatar for deceptikon
0
246
Member Avatar for calvintmoss

> 1, all the times I have done a comparasin, > < == in the past there has been an else, in this their is none It's implicit. You can pretend it looks like this if you'd like: if (a+b > c+d) return func(a + b, c + d); else …

Member Avatar for deceptikon
0
3K
Member Avatar for romiaujla

It has nothing to do with the "array" and everything to do with the wacky use of pointers for smallest and secondSmall. Just make those regular float variables, there's no need for pointers there.

Member Avatar for romiaujla
0
216
Member Avatar for luixoja

> I dont know how to use pointers. That's your problem, and the fix is learn how to use pointers. But since you'll probably get mad if I don't offer an exact solution to your immediate problem, change this: t_matriu *Crea_M ( int dim ) To this: t_matriu Crea_M ( …

Member Avatar for deceptikon
0
131
Member Avatar for Ancient Dragon

I'd hold on to it. You never know when you might be asked to work on a legacy project that requires that version of Visual Studio. In fact, I have a copy of Visual Studio 6 both at home and at work precisely for that reason. I've benefitted greatly from …

Member Avatar for BigPaw
0
110
Member Avatar for ~s.o.s~

Tonari no Kaibutsu-kun and Suki-tte Ii na yo are all I need to call this season a home run. Today is a good day for otaku deceptikon-kun. :)

Member Avatar for Doogledude123
1
317
Member Avatar for Learningvinit

> Actually what happens is we get error in realloc function written in gfunc_Realloc Function in line 174 As a proof of concept, replace realloc() with the corresponding free(), malloc(), and memcpy() process. I'm willing to bet the error you get is happening in free(), which means you've corrupted the …

Member Avatar for Learningvinit
0
873
Member Avatar for Asuna kyoko

Given that the code was pinched verbatim from [this article](http://www.linuxforu.com/2009/02/a-voyage-to-the-kernel-day-8/), my initial question is why do you think it needs debugging in the first place? Does it not work? That's somewhat likely, but I'd like to believe the article's author wouldn't publish untested code. Or does it just do something …

Member Avatar for deceptikon
0
113
Member Avatar for shawn.widjaja

You could certainly do it that way, but it's excessively complicated. The pattern adjusts predictably for each row, so just keep it simple: #include <iomanip> #include <iostream> using namespace std; int main(void) { int distance = 7; int i = -1; while (++i < distance / 2) cout << setw(i) …

Member Avatar for deceptikon
0
155
Member Avatar for pooja.singh.3950

Give it a try first. We require that you provide proof of effort on homework problems.

Member Avatar for deceptikon
0
230
Member Avatar for pravtdelhi

> What does this error mean? It means you must declare something before you use it. Specifically, getMatrix() and displayMatrix() are defined (and declared) *after* main(), but you use them in main(). Add a prototype to declare each: void getMatrix(int number); void displayMatrix(int number); int main(void) { > More fundamentally, …

Member Avatar for pravtdelhi
0
157
Member Avatar for nitin1

> i have to do division without divison/multiplication/mod operator. Yet another dumb assignment that serves no purpose in reality. Can't educators think of more practical exercises?

Member Avatar for somjit{}
0
224
Member Avatar for Carc369

> assert( ! inStream.fail() ); // make sure file open was OK And if the file wasn't opened okay you'll hard stop the process with a cryptic error? Sounds like the pinnacle of user-friendliness. :rolleyes: assert() is intended to help the programmer debug impossible errors at development time; it's not …

Member Avatar for Carc369
0
2K
Member Avatar for weblover

> Then read from the file and when you run into array boundaries expand it using realloc(). An alternative would be a two pass algorthm that counts the number of lines and maximum number of columns for the first pass, then allocates the array and populates it in the second …

Member Avatar for weblover
0
7K
Member Avatar for Rizwana Begum.A

> that sounds good... any code exapmples? That's something you could (and should!) search for yourself, but I'll bite: #include <stdio.h> #include <string.h> int main(void) { char src[] = "This is a test"; /* Note that it's an array and not a pointer */ char *tok = strtok(src, " "); …

Member Avatar for somjit{}
0
168
Member Avatar for kmlilo

The `switch` statement isn't well suited to ranges, and it also doesn't support floating point cases, so you're SOL in converting the grade calculating from an `if` chain to a `switch`. May I ask why you need to do this? Is it a requirement from your teacher?

Member Avatar for deceptikon
0
290
Member Avatar for vicky30312

Let's start with the two most obvious bugs: 1. You compare two values with the == operator, not the = operator. The = operator is for assignment. 2. `if` statements and loops with more than one statement in the body *must* be wrapped in parentheses. It'd be a good idea …

Member Avatar for Gonbe
0
333
Member Avatar for ZmohJ

> Either get a new compiler (free) or forget about your program. You could queue up the keystrokes and process them in sequence. Provided they're processed quickly enough, the end result should be comparable to a threaded solution. It's not like games weren't written with Turbo C when it *wasn't* …

Member Avatar for deceptikon
0
130
Member Avatar for nitish.achar.9

Hardware typically comes with device drivers that provide an interface for system and user level applications to use the hardware.

Member Avatar for Lucaci Andrew
0
96
Member Avatar for rithish

[Click me](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx#delete).

Member Avatar for Gonbe
0
143
Member Avatar for aunog.arafat

> character=getch means????? It means you need to realize that this isn't Twitter. You don't have a 140 character limit, so please engage your brain and try to communicate like an intelligent human being. You'll get much better answers if you ask comprehensible questions. kthxbye.

Member Avatar for deceptikon
0
69
Member Avatar for gazzy1
Member Avatar for deben.salemme
0
153
Member Avatar for MrEARTHSHAcKER

> But still, I'm curious, why does (*this)[i] work? Because you're dereferencing the `this` pointer and then accessing the overloaded [] operator (which is technically a member function). While it may look the same as `a[i]` in your example, under the hood the two are very different.

Member Avatar for deceptikon
0
119
Member Avatar for dooboosjsdjs

I can't decide which answer is most appropriate, so I'll provide both: 1. Do your own damn homework! 2. Please provide proof of effort and then ask a specific question if you want help with this problem.

Member Avatar for Delnith
0
158
Member Avatar for Delnith

You can also select which language to compile as in the project properties: **Configuration Properties -> C/C++ -> Advanced -> Compile As**.

Member Avatar for Delnith
0
101
Member Avatar for mathews123

You didn't check to see when A equals 120. The implicit check is against 0, so your loop actually looks like this: while (A++ != 0) { B += 10; } There are a number of things that can go wrong here, which you can limit a bit by changing …

Member Avatar for deceptikon
0
191
Member Avatar for rithish

It's possible to bubble sort a linked list, but it's kind of dumb given the overhead of indexing a linked list *on top of* the weakness of bubble sort.

Member Avatar for Ancient Dragon
0
477
Member Avatar for abdulhamid1

Discussion of software development specific topics with a primary focus on helping both students and professionals with their specific problems.

Member Avatar for deceptikon
0
43
Member Avatar for 0773247886

> The person either didnt want to do it I'd argue that if he didn't want to write such a simple program he's at a level where Gonbe's code would be easily recognizable as plagiarized by any teacher with more than two brain cells to rub together. That's assuming he's …

Member Avatar for vijayan121
0
173
Member Avatar for mickael.reinman

Your format string is incorrect. The %s will read until the first whitespace, so a literal ':' won't be matched (since it was already extracted) and will cause the fscanf() call to fail. If you want to match it then this would be better (example using the first line): char …

Member Avatar for mickael.reinman
0
4K
Member Avatar for iamthwee

> I just wondered what might be your training routines. Post and share them here. This is my current routine: Mon: Upper body (bench press, rows, pull ups, biceps curls, triceps extensions) Tue: Lower body (leg press, leg curls, calf raises, back extensions, crunches) Wed: Rest Thu: Upper body (same …

Member Avatar for Mike Askew
0
437
Member Avatar for dhatsah

> I was wondering is it at all possible to programatically select an area of an image to display? Of course. Though how you do so depends on what kind of processing you're doing. Sometimes a thumbnail will work, other times you can simply crop, still others might have you …

Member Avatar for dhatsah
0
183
Member Avatar for Learningvinit

> Ignore the above it would be an answer so it's evil and totally stupid of me to post. No offense, but this statement makes you seem childish and bitter. Surely you can tell the difference between explaining how const works and posting a complete working program for an obvious …

Member Avatar for nitin1
0
546
Member Avatar for Nomi55
Member Avatar for tanvir.firuz

> const int DELAY_IN_MICROSECONDS = 100; > Sleep(DELAY_IN_MICROSECONDS); Sleep() takes a parameter that represents *milliseconds*, not microseconds. I just wanted to point that out in case readers don't study the documentation you linked to closely enough, and then find Sleep() doesn't have the granularity they want.

Member Avatar for Gonbe
0
131
Member Avatar for tejaes
Member Avatar for sandy.phan.37

> Because when you rename the structure list to list_t but nowhere was struct list defined before that line. That's not a problem. You can use an incomplete type as the alias in a typedef, provided there's no instantiation of the typedef that would require the alias to be complete …

Member Avatar for deceptikon
0
8K
Member Avatar for Icekilla

> But I don't know how to implement the necessary code to print the number pyramid. It's a little more complex than what you've done. I'd suggest breaking each line down into four parts: 1. Leading whitespace. 2. The leading half of the row. 3. The midline of the row. …

Member Avatar for deceptikon
0
271
Member Avatar for somjit{}

> i dont understand why i get output for cases (step number: 3,4,5 and 8,9,10) when "low" and "high" are equal, where as the if() condition in the partition() block states recursion only when low<high... That might be confusing if your output were performed *inside* the `if` statement's body, but …

Member Avatar for somjit{}
0
441

The End.