49,761 Topics
| |
Ok, so I have been tinkering a bit in CPP. I was wanting to do a cash register type system because its kinda simple yet a good challenge for me. I am thinking about good ol iostream for echoing all of the choices, and switch statements or elseifs for taking … | |
hello there, can someone here with a kind heart to explain to me how the struct request_sense sense errors when you use the cdrom.h. thanks! | |
Hello everyone and thank you for taking the time to read my post I am running Visual C++ 2005 and I'm having some trouble with GDI+. I have two bitmaps: [CODE] Bitmap* pngFrame; Bitmap* pngEmblem; [/CODE] I initialized them in a function I use, and I can display them no … | |
I am trying to call a C# function which returns byte array from C++. Can anybody have some sample code. Thanks njvr | |
[code=cplusplus] #include<iostream> #include<cstring> #include<fstream> #include<iomanip> using namespace std; void CREATELIBRARY(); //function to validate creatdate int main() { CREATELIBRARY(); return 0; } void CREATELIBRARY() { ofstream outFile; char creatdate[10]; int bookno,catno,title;//[30] outFile.open("BOOKS.dat"); cout<<"Enter the creation date (MM-DD-YYYY):"<<endl; cin.get(creatdate,20); cin.ignore(80,'\n'); //function to validate creatdate cout<<creatdate<<endl; outFile<<creatdate; cout<<"Enter the number of books:"<<endl; cin>>bookno; … | |
I recenly read this piece of code: [CODE]heap.push((Edge){x, 0});[/CODE] where Edge is something like [CODE]struct Edge { int a, b; }; [/CODE] I wonder how standard this syntax is? do all compilers understand this and is it ok to write such code? | |
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 … |
The End.