Posts
 
Reputation
Joined
Last Seen
Ranked #80
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
99% Quality Score
Upvotes Received
195
Posts with Upvotes
167
Upvoting Members
99
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
62 Commented Posts
9 Endorsements
Ranked #207
Ranked #141
~301.99K People Reached
About Me

Geeky programmer looking for the meaning of life, which so far seems to have very little to do with software

Interests
I have a daughter and therefore I have no time for interests...Oh ok RPG (the proper table top variety)
PC Specs
Home: Core 2 Duo Desktop Triple Booting Ubuntu/Vista/XP Work: Core 2 Duo Laptop WinXP and Core 2 Workstation…
Favorite Tags

556 Posted Topics

Member Avatar for vegaseat

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Rich Cook

Member Avatar for Reverend Jim
15
13K
Member Avatar for Reverend Jim

Seems we tend to get most irrate at the things we know and therefore stand out most to us as being wrong. A friend of mine who had been a train driver used to get excptionally irrate at how TV/movie trains react to things on the line vis-a-vis a) There …

Member Avatar for Reverend Jim
10
3K
Member Avatar for rajii93

USART and SPI generally do different things and both tend to be 3 wire connections (because they require a ground). 2 wire connections tend to be used on a single PCB and don't require a ground because it would be extrememly unusual for a single PCB to have more than …

Member Avatar for Dorian_3
1
379
Member Avatar for yhh

I think you mean [b]L[/b]d returned 1 exit status. Do you really mean you tried to link the 2 c files and the h file or do you mean you compiled the c files and tried to link the resulting objects? The processor of building a program is [list] [*]Compile …

Member Avatar for Sean1234$
0
14K
Member Avatar for chumli

Youve missed to top of your code 1. The easiest way to put a repeat into a game once it is already working is to move the whole game into a function, then add your loop that askes the user if they want to repeat in main and call the …

Member Avatar for chumli
0
300
Member Avatar for alon4963

Your method, BankAccount::NewBankAccount seems to be strangely named and you haven't included the code for it. I would more normally expect to see this sort of polymorpic behaviour implemented through a base class pointer BankAccount* acct = NULL; if (TypeToCreate == Normal) { acct = new BankAccount(name); } else if …

Member Avatar for rubberman
0
150
Member Avatar for aluhnev

I think that rather begs the question why would you want to create a package that either doesn't have a sender or doesn't have a receiver? Almost by definition a package should have both. Building on what @rubberman provided you can easily do this just by using the default constructor …

Member Avatar for rubberman
0
259
Member Avatar for muhd.hadziq

"Why i can compile the program ?" this is a strange question, you can compile the program because you have a computer with a compiler on it ??? I suggest you try asking the question you actually want answered, are you getting compiler errors? Then post them. You have an …

Member Avatar for aradicev
0
147
Member Avatar for Jophis

In both cases you have the following problems 1. `scanf("%d ", &shift);` the space after the %d is superfluous and could cause issues, remove it. 2. scanf will likely leave the '\n' (newline) after the number in the input stream which means in both cases the first character read by …

Member Avatar for loserspearl
0
175
Member Avatar for muhd.hadziq

You could simplify this by only putting the calculation of the monthly reward in the switch statement, i.e. double reward; /* printf/scanf statements to get membership and monthly purchase */ switch(membershiptype) { /* Cases to calculate the monthly reward and store in reward */ } /* printf statements to output …

Member Avatar for Banfa
0
180
Member Avatar for Pyler

Remember that strtok (which frankly I would avoid using if possible) works by overwriting the delimiters with '\0', it is not deleting anything. It returns pointers into the original string. So when you call char *token; token = strtok("greetings pe()ple", "()"); it scans forward until it finds the '(', replaces …

Member Avatar for Banfa
0
1K
Member Avatar for Jackson Festo

Firstly there is no need to use capitals that is generally consider rude as it is normally taken to equate to shouting. Posting the code will make easier for us to help. Posting a copy and past of the actual compiler output will make easier for us to help. I …

Member Avatar for Banfa
0
216
Member Avatar for bernardo.mclobo

Line 171 is redundent, it repeats line 168. The problem is line 169 temp->previous = new_node->previous; You are inserting the new node after temp so `temp->previous` should not change. `new_node` is ... well new, and so its previous pointer is set to NULL, you overwrite a value that does not …

Member Avatar for bernardo.mclobo
0
413
Member Avatar for nitin1

It rather depends on what the function is supposed to do, the function you have written assumes that the calling code has cast a bytearray to a void pointer to pass into the function (a somewhat pointless exercise in C++) liek this bytearry data; function((void*)&data); The bytearray create in func …

Member Avatar for Banfa
0
143
Member Avatar for andreas.petrou.967

There are all sorts of algorithms you can use, the problem with sorting a singley linked list is in removing an item from the centre of the list requires that you have a pointer to the the item before the item you want to remove (because it has a pointer …

Member Avatar for andreas.petrou.967
0
202
Member Avatar for COKEDUDE

This is because fgets effective consumes the newline for you and fscanf doesn't I assume your file is R XXXX R DISNEY Remember at the end of each line is a newline character so the file can be presented by the character stream R XXXX\nR DISNEY\n This is an important …

Member Avatar for Banfa
0
1K
Member Avatar for Simon180

Looks like you are compiling very old legancy c code and like you are using a c compiler. C does not support function overloading so basically this error is saying you declared the function create_timer one way and now it has come accross another declaration that is different, has a …

Member Avatar for Banfa
0
203
Member Avatar for pooja.singh.3950

> If you exchange a block of m grams, you get three blocks of weight m/2, m/3 and m/4 grams each. Is the important part of this question because 1/2 + 1/3 + 1/4 = 13/12 or more than you started with. However, fractions are rounded down, so for example …

Member Avatar for pooja.singh.3950
-2
391
Member Avatar for Simon180

At line 19 and 20 you are using the symbols `sys_nerr` and `sys_errlist` but this is the first time the compiler has seen them, you have not previously declared them anywhere hence they are "undeclared". You may have missed out a header file in which they are declared or you …

Member Avatar for NathanOliver
0
1K
Member Avatar for gadgets1010

Wrapper classes don't have to encapsulate another class, they can for instance encapsulte a legacy C interface or in your case a propriatory interface to some board. If you are trying to implement the same wrapper interface for 2 different boards it is worth using an interface class so that …

Member Avatar for Banfa
0
163
Member Avatar for Sean_8

For the main to work you would have to change the output lines to cout << v1 <<" * "<< v2<< " = " << dot(v1, v2) << endl; All of your methods pass by value, Vector2D does not contain 2 much data, 2 doubles and a bool so about …

Member Avatar for Banfa
0
2K
Member Avatar for andruluchko

Your while loop, lines 17 - 26 puts your list together in reverse order, so the first numbered entered appears at the end of the list and the last number entered at the beginning, because you keep adding to the front by altering `first`. That's OK it is the simplest …

Member Avatar for Banfa
0
2K
Member Avatar for aluhnev

Your condition at line 45 `if(exp >= 10)` is wrong. Remeber that any number raise to the power of 0 is 1 but this is not what is embodied by your condition. I would also say you are missing a newline or 2 at line 43. Also storing exp as …

Member Avatar for Banfa
0
272
Member Avatar for myk45

At line 24 remove the `this` because that makes the current class (window/widget) the parent but line 36 tries to make the `_verticalLayout` the parent too and causes the warning since the parent is already set.

Member Avatar for Banfa
0
454
Member Avatar for Rashmi_1

Actually your code compiles fine, but it fails to link because in binTree.h you declare all the functions in the template class binTree but you don't define any of them. You need to write the imlementation of all those functions.

Member Avatar for Banfa
0
346
Member Avatar for Web Spider

libpcap is just the library that enables you to capture the network traffic, if the data you are capturing is not a protocol that WireShark already handles then your only options are to extract the data by hand (i.e. copy it off the screen or export to a text format …

Member Avatar for L7Sqr
0
137
Member Avatar for tgreiner

> Everything works fine if I use #include "Error_Handler.h" in the code. But #include "ErrorHandler.h" Typo in post or actual mistake? That said it would still help to see a few lines of code round the line producing the error. Also is this the first compiler error you get, if …

Member Avatar for tgreiner
0
172
Member Avatar for aluhnev

**Line 54** template<class T > T display_array(T ItemType[10] , T const int arraySize) This is invalid. Remeber that the compiler will substitude the type T in the template into the code provided in order to instatiate the function for you. You can do this by hand and should get the …

Member Avatar for aluhnev
0
195
Member Avatar for HuePig

Subscriber::update, Subscriber::alter and Subscriber::noMessage all sound like they are doing the same thing and should be a single method. For the operation you want to perform you are missing an operation in Blackboard because there is no way to get the current message, you need a BlackBoard::getMessage method. Blackboard::notify and …

Member Avatar for Banfa
0
356
Member Avatar for JayGarxP

Your are deleting memory that is in use and you are mixing heap and stack memory and trying to delete stack memory, all in `Sport::add`. You are using dynamic arrays of pointers so Line 194 - 201: Allocate a new array of pointers (`temp`) copy pointers from `array` to `temp` …

Member Avatar for Banfa
0
290
Member Avatar for tapiwa.matombo

Your code seems to work fine for me when I compiled it with MinGW after I commented out `#include "stdAfx.h"`. Note that "Visual Basic C++ 6.0" is not a thing did you mean Visual C++ 6 which is rather old?

Member Avatar for Banfa
0
154
Member Avatar for wad11656

You will need code in your main function and you will need your other functions to return either a status or a sentinal value that can be tested in main to determin if the execution path needs to return to the start of the switch statement.

Member Avatar for Banfa
0
166
Member Avatar for cambalinho

This issue here is because MyTimerProc is static, and must be static to be passed to the C WIN API Function SetTimer it has no this pointer i.e. it does not require or have an instance of the object. It is in effect a normal function. However tmrprocedure is member …

Member Avatar for Banfa
0
498
Member Avatar for NardCake

Line 11 `argv[i] = malloc(sizeof(temp));` or the modified form `argv[i] = malloc(sizeof(temp+1));` does not allocate enough memory. temp is a `char*` and has a fixed size 4 bytes (or maybe 8 depending on platform) so these 2 lines respectively allocate either 4 or 5 bytes of data. You then strcpy …

Member Avatar for dinad578
1
5K
Member Avatar for mustafa.bahaa

My compiler does not support scanf_s (it's a Microsoft extension I think) but if I change your scanf_s to a scanf call it works as expected. So I looked up scanf_s in the Microsoft help and it said > Unlike scanf and wscanf, scanf_s and wscanf_s require the buffer size …

Member Avatar for Ayrton C.
0
421
Member Avatar for iAssistant

> Yeah, you Europeans get the warm ocean current smashing on your coasts, while we get it on its way back from Greenland! Yes and it's that warm ocean current and the jet stream that means that currently a flood warning map for the UK looks like this ![3a352d43ba69bb3f3cf7f006e1743b69](/attachments/small/2/3a352d43ba69bb3f3cf7f006e1743b69.png "align-left") …

Member Avatar for Stuugie
0
4K
Member Avatar for Vikram Sehgal

I doubt it is compiling. Line 4: You have used assignment `=` when you meant to use compare `==`. `'36'` is not a valid character and it is not a number, if it compiled I expect it had the value 51 which is the ASCII value for the character 3. …

Member Avatar for Vikram Sehgal
0
2K
Member Avatar for XodoX

You don't really need to re-write the code so it works with HTTP, HTTP uses TCP/IP sockets. HTTP is from the application layer of the protocol stack and TCP from the Transport layer and IP from the Internet layer; respectively layers 4,3 and 2 of the communication stack. That is …

Member Avatar for Banfa
0
259
Member Avatar for KushMishra

1 from the section of my website that I call "Poetry (sort of)" The velociraptor of C++, was talking to a poet thus: the poet spoke, with some remorse, “It's hard to fit your name in verse.” The raptor to the poet said “No it's not 'cos my name's Fred. …

Member Avatar for ddanbe
1
737
Member Avatar for Patrick_6
Member Avatar for DkgMarine

And it also looks like you are using pointers in the members of your structures when it looks like you did not intend to. struct the_struct { char *FirstName[20]; char *LastName[32]; int *Score[20]; }; FirstName and LastName are an arrays of pointers to char, did you in fact mean to …

Member Avatar for Banfa
0
262
Member Avatar for mystycs

If for some reason you can't or don't want to implement `operator<`, for example it is already implemented to do something else you can always use the 2nd form of `std::sort` template <class RandomAccessIterator, class Compare> void sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp); Which takes 3 parameters the 3rd …

Member Avatar for Schol-R-LEA
0
419
Member Avatar for COKEDUDE

It is not at all clear what you are trying to achieve, however strings is an array of pointer to char (char \*) so `strings[i]` (or any other index) has type char \*, it is a pointer. I have no idea why you would then cast to integer as testing …

Member Avatar for Ancient Dragon
0
557
Member Avatar for ishaan3731

That is because you only have 1 buffer, buff. At line 13 all you do is store a pointer to buff in the array token so all entries in token end up pointing an the same buffer, buff and when you print out your tokens they all contain the same …

Member Avatar for ishaan3731
0
201
Member Avatar for catastrophe2

You have a few small problems but the one causing the error you are seeing is in Queue<ItemType>::Enqueue, if rear is NULL you set front but you do not set rear so the next time you enter this function rear is still NULL and you just overwrite front, incidentally causing …

Member Avatar for catastrophe2
0
206
Member Avatar for Hector_2

Your problem is between lines 23 - 31. You get 3 numbers from the user but you only use 1 variable so everytime you overwrite the previous number that the user input. Then at line 31 you push a single value, the last onbe entered, onto the stack. This comment …

Member Avatar for Hector_2
0
335
Member Avatar for can-mohan

Problem 1: is at lines 45 and 48. You are passing pointers to objects that are on the stack but your class assumes that the objects are on the heap and treats the pointer accordingly. Calling delete on a pointer to a stack object is always going to fail. In …

Member Avatar for can-mohan
0
446
Member Avatar for sparky58

You're trying to declare the same object `obj` twice at lines 19 and 22. Your use of `Fileout` as a global object is extremely bad practice and the sort of thing that leads to unmanageable spagetti code. make `Fileout` local to main and then pass a reference to it to …

Member Avatar for Banfa
0
401
Member Avatar for sitidahleeya

The problem in deleteEntry is that you just free the memory for an entry without updating any of the pointers in the list at line 24 void deleteEntry () { struct Node *curr = Head; char name [15], decide; int Decide; printf("Last Name To Delete\n"); scanf("%s", &name); getchar (); while(curr …

Member Avatar for Banfa
0
204
Member Avatar for COKEDUDE

I've always said in C you should not cast the return value of malloc (or calloc). That is because if you leave out stdlib.h C will happily let you call the function without a predeclaration (although many C compilers produce warnings for that now but people then have to take …

Member Avatar for deceptikon
0
350

The End.