49,755 Topics
![]() | |
Well this is my problem, I wrote a function to sort a 2d char array but right now the second dimension bound cannot be variable so it has to be hardset (which I don't particularly like) This is what I have [code=c++] void multi_charSort(char array[][5]) { int i,j; char temp2[5]; … | |
I wrote this trying to understand templates, functors and inheritance. it works but I want to know if there's a better way. Is a base and derived class overkill for a sorting function? How cand I make it better? [code=cplusplus] /* sorting test Class based sorting by Kimberly Hamrick */ … | |
can anyone tell me the relationship between smartwin and wxwidgets? i am looking for books on smartwin but there seems to be none. there is however one book on widgets. smartwin source code contains many "widget" words so i am wondering if they are the same thing. if i buy … | |
Hi could someone possibly convert this VB Code into C++ for me? it would help ALOT! [CODE]Private Declare Function GetVolumeSerialNumber Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal … | |
Help me Plz, thank you!!! | |
I have a question to drow a line in GUI programming. I hope you could help me:) In fact, it's not a continuous line, it's a line with break. The function I use to draw this line is like this: Void DrawBreakLine(int nStartPoint, int nEndPoint, BYTE bPattern) the last parameter … | |
How to pass char* as refrence in a funstion? | |
Hi i have been asked to write a program to generate fibonacci as well as non fibonacci numbers till a certain value. i have just started learning c++. i managed to find the fibonacci series but i am unable to find the non fibo one. how do i go about … | |
Hi friends. Do you know a library/header file/...etc. which has codes/instruments to write codes related to (how to read frame/frames from multiframes images or from video file? ) Thanks. | |
All week now I have been searching for a good way to load and display PNG files. Every solution I try never works. So now I am posting on the forums. I am not looking for a huge library. In fact, I'm not looking for a library at all. All … | |
[CODE=CPP]#include <iostream> #include <cstdlib> #include <cmath> #include <ctime> using namespace std; int main() { srand(time(0)); int randNum = rand() % 100 + 1; // Generates random number between 1 and 100 int num = 0; int name;//Name of player cout << "Welcome to the Random Number Guessing Game!!"<<endl; // Name … | |
we r doing a project on data recovery...... is there any way how to access hard disk directly..... | |
I have Windows XP with Dev-C++. I created a Windows Application and added #include <gdiplus.h> to the top of the file. I made sure I had gdiplus.h and all the files it required in my include folder. However, when I try to run the application. I get these errors: [url]http://rafb.net/p/wD4DPa78.html[/url] … | |
I'm fairly new to C++, and I can't seem to find any sources on opening applications or files straight from the program. I looked up the system() function on this site, but all that it did for me was verify the file's path and post it's size. I need the … | |
:) guys im a firt timer. im making a program which reads floating point numbers from cin and compute 2 averages: the average of the positive and negative nos. im wonderin wats wrong in my program>> #include<iostream.h> #include<conio.h> int size,i,sumpos,sumneg; int num; main() { clrscr(); cout<<"input size\n"; cin>> size; for … | |
Hi there, I'm completely new to C++ programming and need to find out/verify something in the code below... [code]// my first program in C++ #include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; }[/code] From a web site I (believe I) understand the following … | |
I'm creating an installer for the iPodLinux crew. It's built entirely in Qt3. Right now, I'm stuck on the partitioning stage. I have no clue how to dynamically adjust the cylinder sizes depending on which iPod they selected, or how to embed QtParted in a frame like the Kubuntu installer … | |
Write a program that simulates a lottery. The program should have an array of five integers named lottery, and should generate a random number in the range of 0 through 9 for each element in the array. The user should enter five digits which should be stored in an integer … | |
Hi , I have little bit of knowledge in C++. When I run the following program its gives me segmentation error. I tried to do all the possible things by reading online but not able to figure out the error. I ran it suing gdb debugger but still it stays … | |
we just started a new topic in class of arrays, he gave us an explanation and it was very foggy, but now i got home to do my program i can not even figure out what is going on. Any help you can give would be great. The program we … | |
what is identifier in c++? giv example what is reserved word? example? data types? example? declarations? variables? assignment? expression? | |
How can I initialize a list control and add items or delete items for it? | |
I have a Class Personnel and a sub-class Student how could i change a pointer pointing to Personnel and have it point to Student? I'm trying this [code=cpp] Personnel *person=NULL; PersonnelNode *node=NULL; PersonnelNode *temp, *prev; Student *s=new Student(); while (temp != NULL) { person = temp->getNode(); if (stricmp(name,name)==0){ prev = … | |
Hello all, I am attempting to write a program that will read in, from a file, an unknown number of 4 digit integers into an array (not more than 150 numbers). From there I will be performing various calculations on those numbers. Listed below is what I have for reading … | |
I was playing with a bunch of new things today and came up with this. Did I do anything wrong? [code=c++] /* binary class manipulator Print values or strings as binary by Kimberly Hamrick */ #include <iostream> // for C++ I/O #include <string> // for C++ strings using namespace std; … | |
I am working on a code which has several processes forked(). (linux - KDevelop) The processes after they were created runs paralell in the background. I want to read on a command line (like cinn >> kill=1 ) which tells the main process to kill all the childs and the … | |
Hi All, I am trying to implement the concept of function pointer in C++. While compiling i got some errors which I couldnt figure out the reason . So,Please let me know what changes should be done for resolving that error. I am trying to execute one particular command function … | |
I'm trying to implement a function to copy one instance of a stack into another instance of a stack. The result should be two identical stacks. It only outputs blank lines. I Implementation [CODE] #include <cassert> #include <iostream> #include <string> #include "linkedStack.h" using namespace std; void linkedStack::initialize() { destroyStack(); } … | |
I've written a program that keeps a linked list of Personnel. The Personnel can be of the type Student(inherited from Personnel) each student has the name and id from Personnel and a Queue of type books. Everything works except it doesn't display the list of books. please offer any help … | |
I wrote strlen() for practice but it's really slow. Even if I copy the code from my compiler and run it, it's still slow. This is my test. [code=c++] /* strlen_comp Comparing my and Visual C++'s strlen by Kimberly Hamrick */ #include <assert.h> // for result tests #include <string.h> // … |
The End.