49,761 Topics

Member Avatar for
Member Avatar for codercpp1

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 …

Member Avatar for WaltP
0
97
Member Avatar for jaepi

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!

0
91
Member Avatar for Fromethius

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 …

0
62
Member Avatar for nagramana

I am trying to call a C# function which returns byte array from C++. Can anybody have some sample code. Thanks njvr

Member Avatar for Narue
0
399
Member Avatar for game_fan

[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; …

Member Avatar for Ancient Dragon
0
139
Member Avatar for invinate

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?

Member Avatar for Ancient Dragon
0
77
Member Avatar for ShawnCplus

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]; …

Member Avatar for dougy83
0
228
Member Avatar for Hamrick

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 */ …

Member Avatar for thekashyap
0
146
Member Avatar for quintoncoert

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 …

Member Avatar for Killer_Typo
0
95
Member Avatar for Gunner54

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 …

Member Avatar for Killer_Typo
0
92
Member Avatar for mankichi
Member Avatar for kinggarden

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 …

Member Avatar for kinggarden
0
98
Member Avatar for ridhimasatam
Member Avatar for shalini_roy

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 …

Member Avatar for WaltP
0
190
Member Avatar for Fribs

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.

Member Avatar for dougy83
0
100
Member Avatar for Fromethius

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 …

Member Avatar for WolfPack
0
95
Member Avatar for zandiago

[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 …

Member Avatar for zandiago
0
99
Member Avatar for hina-pande

we r doing a project on data recovery...... is there any way how to access hard disk directly.....

Member Avatar for Salem
0
111
Member Avatar for Fromethius

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] …

0
79
Member Avatar for ClockworkMind

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 …

Member Avatar for ClockworkMind
0
364
Member Avatar for aeroll

:) 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 …

Member Avatar for aeroll
0
170
Member Avatar for Prozeen

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 …

Member Avatar for Prozeen
0
121
Member Avatar for sebajo

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 …

Member Avatar for ~s.o.s~
0
47
Member Avatar for pixrix

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 …

Member Avatar for pixrix
0
1K
Member Avatar for psrujan

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 …

Member Avatar for Techpedia
0
107
Member Avatar for radskate360

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 …

Member Avatar for Lerner
0
626
Member Avatar for lilneppy

what is identifier in c++? giv example what is reserved word? example? data types? example? declarations? variables? assignment? expression?

Member Avatar for thekashyap
0
88
Member Avatar for mankichi
Member Avatar for mankichi
0
86
Member Avatar for vladdy19

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 = …

Member Avatar for ~s.o.s~
0
170
Member Avatar for alembic21

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 …

Member Avatar for vijayan121
0
121

The End.