49,756 Topics
![]() | |
hello everybody, I am a beginner in C++. I got a CD with a C++ how to program,fifth edition book by Deitel which has the source codes included in the books. The source code for ATM case study is in parts i.e. user defined header files r dere which includes … | |
Hello there, I'm creating a cd writer application. As of now, I was able to create a data burning application for cd-r/rw. I'm having trouble finding the code block for writing audio cd. I'm using cdrom.h and the command for writing data is CGC_DATA_WRITE together with GPCMD_WRITE_10, I looked for … | |
If you can help me? I have some problems.I have to put the five marks in five subjects for a student.The student must have ID,Name ,Surname,Subject and Mark. This we have to write in a file.Then we have to write in Screen the results(toread from file).After that I have to … | |
Hi, Can someone expain why ompiler provide default Copy Constructor for every class. As i know there is only one reason that if Compiler does not provide the copy constructor, f we pass the object by value or we create a new object from existing object or we return object … | |
you know... i could never figure out how to use forks in c++... my teachers can't explain it (yeah... i know... they must be great teachers, right?), i can't find a chewable explanation of how to use them... so... since, i guess students are better teachers than teachers themselves, specially … | |
I am a beginner at C++, (thought not really to programming in general)........................... and decided to challenge myself to write something: A descrambler........... I know what I need to do. I need to: [code] (any code is pseudocode) open scrambled words file open the wordlist :loop get scrambled words get … | |
In this question you have to write a program consisting of two functions. A string has to be input in the main function and then a string function, namely shorterString, has to be called to shorten the string by deleting (“erasing”) every third character of the string. This has to … | |
i want to clear a string after the prog. has done it`s work. i tried it by using a for loop and assigning a blank, but it didn`t work. the problem is that if i run the program again then the earlier value is displayed again . i`m using Turbo … | |
[code] #include <iostream> using std :: cin; using std :: cout; using std :: endl; #include <iomanip> using std :: setw; const int rows = 3; const int column = 3; void PrintTicTacToe( char [][3] ); //The function prototpyes for this program void p1( char [][3]); void p2( char [][3]); … | |
Hi, I'm writing a C++ program with Qt4 libs. When I do a particular sequence of operations, my program exits (but does not crash) with this error in the console: [CODE]my_program: symbol lookup error: libqtxml_plugin.so: undefined symbol: _ZN15QXmlInputSourceC1EP9QIODevice [/CODE] The function is inside a plugin I've written to parse XML … | |
i know i learned it somewhere, but its been a while since i used it... how do you make an user given array size... i mean...[code]int b; cout<<"Input the array size: "; cin>>b; int array[b];[/code] i know this is not hte way of doing it... but just so you get … | |
I'm running my program in linux v. 2.6.20 and gcc v. 4.1.2...i got a problem here...when i compile my source code .cpp using gcc there's no error... but when i compile using g++ there's an error "undefined reference". sample: File.cpp: (.text+0xc50): Undefined reference to 'ClassB::Close' what's the problem with this? … | |
[code=c]//Writee a program that inputs a3 digit number finds the sumof these digits #include <iostream.h> #include <conio.h> #include <math.h> int main() { int num,num1,num2,num3,num4,s=0; cout<<"Enter the Number: "; cin>>num; num1=num%10; num2=num/10; num3=num2%10; num4=num2/10; s=num1+num3+num4; cout<<"The sum of digits= "; cout<<s; getch(); return0 }[/code] This program I wrote but shows error … | |
I added a line to this program to read the length of the the string , then display the test. strlen() is not cooperating! Am I using the wrong function? the compiler says the arg should be char*. I'm confused! [code] #include <iostream> #include <string> #include <vector> using namespace std; … | |
what is the different about C++ n C.. i have a program below which my friends say that it is on C.. how do i change to C++.. [code] #include <stdio.h> #include <stdlib.h> char matrix[3][3]; /* the tic tac toe matrix */ char check(void); void init_matrix(void); void get_player_move(void); void get_computer_move(void); … | |
ok i need some help on programming a "delete" button that needs to do the following: it needs to access a server "\\server" and then a sub share on that folder so: "\\server\subshare" then it needs to delete everything in the subshare folder completely. does anyone have any suggestions? | |
Please take some time to read my questions. Thank you. My current C++ exercise project is a win32-console text-only MUD engine. (MUD = "Multi-User-Dungeon" referring to the game genre in which the player wanders around in a 'map' of 'rooms' and can interact with many 'items' and 'characters'. In the … | |
I am trying to write this loop in a simple convert process, but I get all sorts of crazy errors when I try using the "not equals" operators. here is my code: int main() { int i = 5; std::string s; do { cout<<" Enter a string: "; cin>>s; cout<<endl; … | |
I was experimenting with a direct method of dereferencing an iterator. It works OK with numbers, cout gets confused (??) when the derefenced pointer is a string? The code was supposed to stuff a vector, then read it out . I hacked up that original to do some troubleshooting and … | |
Can somebody help me understand what does this function do? And also if there are any logical or syntactic errors in the function. I was told that there are 2 bugs in the code. I can only think of 1 which is below: 1. In the first while loop in … | |
What is a two-dimensional char array with 3 rows and 3 columns. Can give me an example of a program. Thanks | |
Hi to all , I wished if any one of you could throw light on [B]mechanism of insertion sorting in C++[/B]. I know what is bubble sorting but I had confusion regarding what is insertion sorting? In school my professor had mentioned about it, but I do not have any … | |
Please Help, I have our first assignment here on functions. It is pretty difficult, at least the one part that I keep getting stuck on. I seemed to manuver through the other parts I was having trouble with so far. But to start our assignment is to write a program … | |
can anyone give me more info on the system command? It allows you to execute dot exe programs from your code. I am in particular looking for return values. Can one get the system function to let the called program write its output to a variable instead of writting it … | |
a)i got stuck with a qustion which asks for a date input in this format: DD-MM-YYYY. I used a string to get the date input because the "-" are required, but then i'm not sure how to check that the user only enters dates. b)another problem i encountered is that … | |
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; … |
The End.