624 Posted Topics
Re: 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 … | |
Re: 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. | |
Re: [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, … | |
Re: 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. | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 = … | |
Re: 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 … | |
Re: 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 … | |
| |
Re: 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 … | |
Re: 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! … | |
Re: Wow that is just too painful to read. Curly brackets all over the place. Fix it up a bit please. | |
Re: 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' | |
Re: [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 … | |
Re: [code=cplusplus] std::cout << "What did you get on this assigment? "; std::cin >> iMark; if (iMark == 0) return false; else return true; [/code] | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 = … | |
Re: [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 … | |
Re: [URL="http://tinyurl.com/dhssuz"]Google It?[/URL] | |
Re: [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 … | |
Re: 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. | |
| |
Re: [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. | |
Re: 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 … | |
Re: 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 … | |
Re: lol. So you DO have ideas? You just don't understand the content? | |
Re: 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] | |
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 … | |
Re: 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, … | |
Re: [URL="http://tinyurl.com/aw9rhj"]Google it[/URL] | |
Re: 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 … | |
Re: 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] | |
Re: [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 … | |
Re: [code=csharp] string s = int.parse(numberValue); [/code] Works great. I too was very confused when I first saw members to an int datatype... | |
Re: 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 … | |
Re: Wouldn't you just end up with this then? a.b->a.b->a.b->a.b to the end of the universe? | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: here's a brute force template [code=cplusplus] for (int i = 0; i < MAX_NUMBER; i++) { if (Condition[i] == Desirable) DoFunction(); else DoOtherFunction(); } [/code] | |
Re: 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 … | |
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?) … | |
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 … | |
Re: [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] |
The End.