624 Posted Topics

Member Avatar for prashanth s j

I'm pretty sure that you can't cast with brackets like in C or C# in C++. You will need to static_cast<data_type>(object/variable) it. Also, if you want to use outbuff as a pointer to a pointer, then it should be declared as one (char ** outbuff). I'm not to sure what …

Member Avatar for hussnain abass
0
361
Member Avatar for sampk2002

Unless you want to be harassed off of the forum, you should show some effort as to what you have written so far. And don't expect anybody to write any code for you.

Member Avatar for frogboy77
-2
112
Member Avatar for cool1_best1

[QUOTE=cool1_best1;816556]We are using a singly linked list with head pointer to implement Stack ADT. The stack top is maintained at the [B]end of the linked list,[/B] i.e. stack top is the last item. Discuss whether this is a good design in term of time efficiency: In a stack of N-items, …

Member Avatar for mitrmkar
0
155
Member Avatar for :)boysie

Hmmm unless its a capacitor or a pretty big resistor or the BIOS thats the problem, there is almost no chance of repair. Most modern motherboards are printed on 3-4 layers, so fixing something via solder is pretty much out of the question.

Member Avatar for dbritanico_ph
0
418
Member Avatar for daviddoria

I've never done anything like that myself, but perhaps add a bool parameter to you function pointer that is default (= to) false? If you don't add the functionality to integrate, then you might as well rewrite the power function to only return a square of the number, since it …

Member Avatar for mrnutty
0
280
Member Avatar for crash override

[QUOTE=crash override;782147]I've been trying to get started with sockets programming. However, when I try to use the getaddrinfo and freeaddrinfo functions, my linker complains that they are "not declared in this scope" and that they are "unused variables". I have checked the header (ws2tcpip.h) and the headers appear to be …

Member Avatar for ndarkduck
0
4K
Member Avatar for mrnutty

I am not too sure what the actual question is, nor do I have time to look through all that code and decide what you may be having problems with. I'm not too sure what you are confused with regarding input, as there are a vast amount of different input …

Member Avatar for skatamatic
0
399
Member Avatar for jdm

To make it a more secure method, you could do a binary write to the file with the time of day (in clock ticks) that the file was written, the number of guesses that occured, and a strange binary combination of the two (AND with time of day + binary …

Member Avatar for jdm
0
226
Member Avatar for Pachrant

Here's a quick, simple solution: [code=csharp] //assume iArray is an array of numbers, and ARRAY_SIZE is the size of it int iFind = 2; //the number to look for repetitions of int iCurrent = 0; int iCount = 0; int i =0; const int Min_Reps = 2; for (i = …

Member Avatar for skatamatic
0
115
Member Avatar for Boudou

Hmmm. Please use code tags. I'm not sure I understand what your rediculous if statement is doing...but I imagine it's supposed to be something like this: [code=cplusplus] int iBiggest(0); for (int i(0); i < SIZE; ++i) if (values[i] > iBiggest) iBiggest = values[i] return iBiggest; [/code] that will iterate the …

Member Avatar for khusroo
0
136
Member Avatar for kelechi96

An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is then converted to a digital value (usually between 0 and 4096) to represent the …

Member Avatar for jephthah
0
456
Member Avatar for pt_solar
Member Avatar for kbmmartin

Usually people that code in C++ don't want things done for them that they don't have control over. If you really want something that nulls and deletes a pointer, write it yourself. As for a reason, this is a bit contrived but...what if you where writing an operating system that …

Member Avatar for siddhant3s
0
6K
Member Avatar for AnujSuper9

Your function makes little to no sense to me. Just think about injecting test values into it. Say you pass it 5, base 10: 5 / 10 = 0.5 = 0 (int) "0123456789abcdef"[0 % 10] = '0' Well damn. It's already broken and didn't even give me my single digit! …

Member Avatar for AnujSuper9
0
3K
Member Avatar for pczafer

Wow that is just too painful to read. Curly brackets all over the place. Fix it up a bit please.

Member Avatar for pczafer
0
144
Member Avatar for nschessnerd

Hmm I'm not to familiar with that command, but it could have something to do with Vistas rediculous overhead such as data execution prevention or some other security 'feature'

Member Avatar for nschessnerd
0
140
Member Avatar for drjay1627

[QUOTE=drjay1627;854276]I'm looking for some help resolving the following warning... warning: format ‘%c’ expects type ‘char*’, but argument 6 has type ‘char (*)[128]’ [code] char data [ BLOCK_SIZE ]; sscanf ( inBuf, "%c %c %c %c", &mode, &c, &s, &data ); [/code] essentially what happens is inBuf is a 'string' and …

Member Avatar for skatamatic
0
167
Member Avatar for luutu_amir

[code=cplusplus] std::cout << "What did you get on this assigment? "; std::cin >> iMark; if (iMark == 0) return false; else return true; [/code]

Member Avatar for skatamatic
0
138
Member Avatar for thebluestar

Hmmm seems like you need to bust out the math book. I honestly dont remember the math functions in CMath, but you should probably look it up. I also don't know how the library you are using supports key entry for stopping, so I'll just say its called GetKey() and …

Member Avatar for skatamatic
0
155
Member Avatar for astonomer

I think the main problem with your loop is...you don't have a loop. Also...when checking the value of a bool it is better practice to either compare it to a bool value or just the actual bool itself. Remember a condition (something that you supply an if statement with) IS …

Member Avatar for skatamatic
0
129
Member Avatar for sciwizeh

Well, if you choose to use an array, you need to determine how much memory a point/edge/poly occupies, and also how much memory you want your program to consume. I may be wrong, but using an array may cause issues, especially when dynamically removing polygons/points during runtime (unless you plan …

Member Avatar for sciwizeh
0
219
Member Avatar for lauren316

Well as for the actual palindrome detecting algorithm, I don't think your code will work. Instead, I think you need to use deques of chars. I'm not all that comfortable with deques, I've maybe used them once, but from my understanding of them this should work: [code=cplusplus] string input = …

Member Avatar for rahul8590
0
693
Member Avatar for The Dude

[QUOTE=The Dude;778394][url]http://youtube.com/v/KdFrSe1d92A[/url] Does this really work?? I reckon only if your computer can handle going that fast!! Otherwise it will only go AS FAST AS ITS ABLE!!! Looks interesting though. EDIT: People are reporting it DOES WORK! [url]http://youtube.com/watch?v=KdFrSe1d92A[/url][/QUOTE] Lol. I suspect that's not the best method of speeding up your …

Member Avatar for Godsp3ed
0
236
Member Avatar for FrancisC07
Member Avatar for Robins Antony

[QUOTE=Robins Antony;828710]Hi friends, How to Find the no of simultaneous users logged in to a web site at a time?. Any help with the C# code will b greatly appreciated. Regards Robins[/QUOTE] Is this for a website of yours? Or just in general? If it is yours, then when you …

Member Avatar for alc6379
0
74
Member Avatar for itsrahulk

You will have to read in the file in binary mode, which means you will have to know which object(s) the file contains so that it can be dumped into the proper class/datatype.

Member Avatar for alc6379
0
72
Member Avatar for Amara
Member Avatar for greg022549

[QUOTE=greg022549;830759]Thank you for your attempt. However, I figured out the problem on my own.[/QUOTE] lol? You never even posted problem to begin with.

Member Avatar for VernonDozier
0
124
Member Avatar for mastermosley

I dont think that vb would compile. Each if is lacking an endif, which makes reading it pretty difficult. Also, i have no idea what linebuffer is or ConnID - I'm assuming ConnID is a reference to the connection socket, and that linebuffer is a buffer that is added to …

Member Avatar for mastermosley
0
164
Member Avatar for zarnimg

That is...incredibly specific. You'll have much better chances contacting the manufacturer. As for the actual printing, here's some snippets from a barcode assignment i did a while back. In no particular order... [code=csharp] #region member variables/consts bool[] bCode = new bool[95]; //barcode bit data array bool bValidCode = false; //flag …

Member Avatar for skatamatic
0
58
Member Avatar for zeeshan_kust
Member Avatar for skatamatic
0
144
Member Avatar for konczuras

Try passing the string by reference. In this case, just do this: [code=csharp] private void Combobox1_SelectedIndexChanged(object sender, EventArgs e) { runstylize(lCombobox1, ref leftborderstyle, "left"); } public void getborderstyle(ComboBox x, ref string y, string z) { y = z+"-was set to:" + x.SelectedItem.ToString() ; change(); } [/code]

Member Avatar for skatamatic
0
87
Member Avatar for skatamatic

Hi, I'm working on a client-server game app involving asyncronous recieving and syncronous sending. Every time a key state changes, the client is to send a state frame to the server. The problem is...after exactly 96 sends to the server, both the client and server crash! I stepped through and …

0
88
Member Avatar for neelima156

What do you mean to update it in the main form? You need to insantiate your class in the main form, and have a member function in the class which will return data to main. An alternative to this is to just make the list contained within the class public, …

Member Avatar for neelima156
0
131
Member Avatar for lcandrade
Member Avatar for Vallnerik25

I don't understand why your are interchanging null terminated c style strings with the String class. The string class alone should suffice here and it handles its own memory (and also contains an overloaded + operator). If you are trying to learn about memory management, write the whole code using …

Member Avatar for Vallnerik25
0
243
Member Avatar for erialclaire_238
Member Avatar for skatamatic
-1
98
Member Avatar for azwraith69

For loops are designed mainly for integer incrementation. They support other datatypes, but this will often result in confusing problems like this. Instead, use a while loop. [code=cplusplus] while (i!=NULL && j!=NULL) { //do stuff i=i->GetNext(); j=j->GetNext(); } [/code]

Member Avatar for kbshibukumar
0
146
Member Avatar for mimis

[code=cplusplus] #include <vector> #include <algorithm> struct Point { public int _iX, _iY; Point(int x, int y) { _iX = x; _iY = y; } } bool operator<(Point const & lhs, Point const & rhs) { return lhs._iX < rhs._iX; } int main() { vector<Point> Points; //insert code to fill node …

Member Avatar for mimis
0
371
Member Avatar for BobLewiston

[code=csharp] string s = int.parse(numberValue); [/code] Works great. I too was very confused when I first saw members to an int datatype...

Member Avatar for ddanbe
0
189
Member Avatar for ofnature

Ummm. I have no idea what you are trying to do. And I don't think that all those mouse events are relevant to the problem, and should probably not be included for clarity. Are you trying to write some sort of macro that automatically fills in textboxes for you? And …

Member Avatar for skatamatic
0
139
Member Avatar for abacuswalker

Wouldn't you just end up with this then? a.b->a.b->a.b->a.b to the end of the universe?

Member Avatar for siddhant3s
0
105
Member Avatar for acthrellis

When you 'repaired' ntdll64 did you delete it altogether? Or did you actually heal it? Because ntdll is vital for the operation of the operating system since it contains information on the NT kernel, which communicates between NT based OS's (like xp) and the hardware. There is hope, potentially. Get …

Member Avatar for acthrellis
0
161
Member Avatar for McMofo08

If you're not comfortable using a linux OS bootable, use Windows Live (google it). I had a virus once that seemed to cause rediculous memory leaks (started at 0 and within a minute spiked my mem use to 100%, which caused an out of mem exception and bumped it back …

Member Avatar for skatamatic
0
109
Member Avatar for Mossiah

You will also probably want to send the size of the array, unless you plan on writing an algorithm to look for the null terminator.

Member Avatar for monkey_king
0
66
Member Avatar for mimis

here's a brute force template [code=cplusplus] for (int i = 0; i < MAX_NUMBER; i++) { if (Condition[i] == Desirable) DoFunction(); else DoOtherFunction(); } [/code]

Member Avatar for mimis
0
147
Member Avatar for bryan23

There was probably a malicious seeming script in a pop-up or other such thing that was saved into a temporary internet cache. If AVG caught it, then it most likely wasn't executed, and has probably already been deleted from the temp folder. I wouldn't get too worried, but if you …

Member Avatar for skatamatic
0
130
Member Avatar for skatamatic

My laptop has been giving me some grief and I'm wondering if anyone else has had any similar problems, and if so what solutions they've found. When I turn on my laptop the display usually stays black unless I hold in the power button for about 15 seconds (flushing capacitors?) …

Member Avatar for skatamatic
0
106
Member Avatar for skatamatic

Hello all, I'm writing an 'Asteroids' clone for an assignment at school. I'm trying to figuire out an algorithm to 'wrap' the asteroids/bullets/ship when it collides with the edge of the screen. I've written an algorithm and it works alright, but has some flaws. It will always wrap to the …

Member Avatar for skatamatic
0
144
Member Avatar for appy33

[QUOTE=dmanw100;784122]If you compile it and it won't run maybe try adding system("PAUSE"); at the end of your code (right before return 0;). This will only work on Windows and isn't portable.[/QUOTE] Instead use this: [code=cplusplus] cin.ignore(cin.rdbuf()->in_avail()); cin.get(); [/code]

Member Avatar for Freaky_Chris
0
201

The End.