51,593 Topics
![]() | |
I'm trying to write a program where the user gives a size of an array. myArray(5) (below) fills and prints a 5x5 array with numbers 1-5 and prints out 5 numbers on a line. The output would look something like this... [code] 1 2 3 4 5 1 2 3 … | |
Hi all, I am working on a C++ program that converts a decimal to a fraction, finds the lowest common multiple, multiplies the numerator by the denominator, then reduces the fraction again so the fraction will be 'numerator/1'. I am using this code in a larger program to change a … ![]() | |
Does anyone have any experience with the free Microsoft development enviroment called Visual C++ 2005 Express Edition? I have downloaded and installed it and I notice it is a lot different than what I am used to. Is MFC gone? If you click on New to create a New Project, … | |
Hello; i have this Question and need your help, i do not know how to solve it; [B]Problem:[/B] Write a member function called [B]countNodeWithNoRchild[/B] that will return the number of nodes in a BT(binary Tree) does not have a right child. (Hint: a leaf node also does not have a … | |
does gcc compiler support graphics file ?how to write graphics program in gcc?pls guide me. in india how to get gcc compiler cd? send me some address. hurry up thanks & regards all members and guest | |
I wrote a hash table that takes a char as a key and for a test I am using a string for my value. It uses a linked list. But I am having a problem displaying the value. I have a function that displays the key correctly but the value … | |
my code was working, but when i added in a new section to enter playing against a computer player, it now hates me, and wont stop trying to kill me. [code=c++] //name: ******* //Lab: * //purpose: ******* //modification date:*********** #include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int … | |
I am currently working on a project which requires me to instantiate objects of a class. The class is in a dll which is accessed via its header file. I suspect that the dll does not work with visual c++ express edition which I am using. I would like some … | |
I am trying to write a program which sends text from a forms Rich Edit Boxes via 2 serial ports( COM3 and COM 4 have 2 rich edit boxes each for incoming and outgoing text) using Borland C++ Builder 2006. This program uses some C++ serial port communication library code … | |
Hi, I would like to ask if anyone know how can I create a tokenizer for a txt file in C++. I find it difficult because there are not only words but there are also numbers and <p id> tags. I have attached the file that is needed to be … | |
For home work i have to do SMS in c++ ,which has to be exactly like on mobile.I dont know how to do this. | |
Need to write c++ code that calls a function and validate the moduleCode with a do...while loop. I ca'nt get the function to go out the loop Pleez help void inputAndValidate(string &moduleCode,int &numberHours) { string ABC111,DEF112,XYZ113; do { cout << " Enter module code: "; cin >> moduleCode; } while … | |
can anyone tell me the difference between visual c++ express edition and visual c++ .net? It would apear that they are the same. Both seems to use the dot net framework. Are there any significant differences? And also how do they differ from other types of c++ such as ansi … | |
Create a class called [B]DateProfile[/B] that has the following private instance members: [LIST] [*][B]gender[/B] - a [B]char[/B], the gender of the applicant.('M' or 'F'). [*][B]search_gender[/B] - a [B]char[/B], the gender ('M' or 'F') of desired partner (this is not the gender of the applicant, but of the applicant's requested partner. … | |
any good tutorials for windows api? online or books | |
Hi Everyone, I have the following function, char* sample1() { char *p = "Israel"; return(p); } //in this case the memory storing india is not destroyed at the end of the function, indicating that it wasn't stored in the stack meant for the function call. However, the following function causes … | |
hi all, i have a program that 'll take an Ip address from the user and 'll search this IP address in a file. now i open this file in binary mode. the IP address will be in this form 169.254.28.233 shall i convert this address into hex before searching? … | |
h[I]i all ,[/I] [I]i have a program that read its input from a file in binary mode![/I] [I]now i nead to store this data and to compare it with another data.[/I] [I]which datataype can my input take.[/I] [I]also, the comapred stream is in this form 0004a4900[/I] [I]i made this stream … | |
I need to validate the moduleCode by a do...while loop. But my code does'nt exit the loop - Not sure if I did right thing by declaring the string ABC111 before the loop - please help urgently using namespace std; // function inputAndValidate should be inserted here void inputAndValidate(string &moduleCode,int … | |
I am trying to define a structure for a hash table. I am making a constructor in my structure but I cannot get it to work with anything except chars. Strings always get me confused as how to manipulate them here. I have a string as my key and a … | |
I need some direction on how to split up code into a .h header and two .cpp files. [code] #include <iostream> #include <cstring> using namespace std; //function for displaying name void DisplayName(char * Name){ cout<<"Name: "<<Name<<endl; //print name on screen } int main(){ char first_name[50]; //static array for holding first … | |
I posted a snippet of code in the c programming forum and like always I used the [code=C] tagging form, however the code did not show properly. Here's a snap-shot of that particular occasion. | |
[code] double M2_0(c,m) double c[160]; double m[16][5]; { int n; int s=0; for (n=0; n<16; ++n) { s = s + c[n+16*0]*m[n][0]; } return s; } [/code] can someone help me! error: c and m was not declare in this scope (this is the error in c++ but in c … | |
I have a little question to ask. I need to have an defitinition of what mean Inheritance and to have an example. I have the book of C ++ but do not have any proper expanation | |
can anyone help me where the cin.get(); should be put? i cant view the final output... it was compiled successfully but i cant view the output when it runs.... #include <iostream> #include <cstdlib> #include <iomanip> using namespace std; typedef int Bool; // converts 0 to 'S', 1 to 'M', etc … | |
Does anyone know which include file is needed for functions; IsLetter (ch) and ToLower(ch) ? Dick | |
Hello I'm just wondering what kind of practice do I need, because I'm ending with C++ and moving to c#. What do I need to be prepared most and what is the hardest part of learning C# from beggining yours sincerely ! thanks :) | |
[code=cpp]#include <iostream.h> #include <stdlib.h> #include <conio.h> #include <graphics.h> #include <iomanip.h> int i,emonth,eyr,wday,nwday,pmdays,x,y; unsigned int totaldays; int monthd[]={31,28,31,30,31,30,31,31,30,31,30,31}; char* mname[]={"January","Febraury","March","April","May","June","July","August","september","October","November","December"}; int gm,gd=DETECT,mx,my; char*cp,*yrp; int xp,yp,textw,texth,skey; void display_month(); void monthgraphics(); void monthloop(); void process_date(); void yeargraph(); void yearloop(); /*main starts*/ void main() { char choice='v'; initgraph(&gd,&gm,""); while(choice!='e') { cleardevice(); setcolor(1); rectangle(1,100,639,350); rectangle(4,102,637,348); … | |
Hi all, I'm a beginner and I tried to write a program to convert celsius into Fahrenheit but i have a problem due to type casting operation. That is even though i explicitly converted an integer to float number I'm getting only integer value . Here's the program : [code]# … | |
I am writting a program which receives args on the command line. Before they can be used however they must be converted to ints. I am using vc++ express edition and I have tried the _strtoi64 function but I cannot get the parameters to this function right. It is specifically … | |
Hi, I have a problem that happens very rarely. I have a calculation which ads (for example) -15000.00 to 15575.51 and saves the results to an oracle database. However, the reslut in the databse is 575.51000002 Both figures are loaded elsewhere from the database and either have 0 or 2 … | |
My friend's asking 'bout writing SMS with computer,which has to be exactly like on mobile.If there are any suggestions, I would be glad to hear'em...=D | |
I graduated high school last year in '06 but unlike a lot of people I know what I want to do for a career move and not sure exactly how to pursue it. In my last 2 years of high school I was enrolled in Cisco Networking Academy I, II, … | |
HELLO can any one pls help me.Am new to this field.Actually i get pic from ip camera.i hav to detect motion in it and make it a video and send it to a mobile.Thanx in advanc.Really looking for help:( | |
Is there any way to write a program to check a computer's serial number as sort of a copy-protect? (i.e., if the serial number doesn't match the expected number written into the program, the program quits.) Anyone know? Thanks, venomlash | |
Hi I am working on some homework and I seem to be in a bit of a bind, I keeping hitting a wall, and I have been reading my book and looking for examples that may help, but I am quite unsuccessful. My Assignment Pull grades and sexes of people … | |
Hello, I am doing a homework assignment and need a bit of help. I have to overload the prefix ++, postfix ++ operator, and the = operator for a circle class. Heres the code I have so far: [code] #include<iostream> using namespace std; class Circle { public: Circle(); Circle(int n); … | |
Dear all, plz help me regarding this C++ Questions. Q.1 Write a simple structure named Students. This structure consists of three variables Name, GPA and TotalMarks. Now write three variables of data type Students. Get value from user for these three students and show them on screen. Q.2 Create a … | |
hello everyone! :))) i am new here and i am really happy that i found such a useful forum. my problem is that i need some help for a project on c++. i have to do a problem (it can be mathematical) which must include classes,list,polymorfisym; hmm i think only … | |
Hello there, I've been studying c++ for about a month. Currently, I'm indulging my self to pointers to be used in classes and functions because i have to familiarize myself with threading. Any of you here knows some good tutorials in threading, preferably html based tutorials. Or, suggestions on what … | |
Hello there, I'm practicing structures and accessing data in a structures. I have here a program that gets an input of string and int from a user. I placed it inside a loop where every time the loop refreshes, it changes the information it gets. My problem is, how do … | |
somebody help me in makefiles pls...... how to create a menu launcher for Unix automatically using only the makefile.. thanx in advance | |
| |
i have here a code that uses pointers to manipulate data in a class...i have a problem of how to show them on screen...i think im using an erroneous syntax...lol... [code=c] #include <iostream> #include <string> using namespace std; class MyClass{ public: string first_name, last_name, id_no; int age; }; int main(){ … | |
Hi; can you check this for me : [code] Time Time::operator-( Time & other, Time & other2) { Time t3; t3.hrs=fabs(other.hrs-other2.hrs); t3.mins=fabs(other.mins-other2.mins); t3.secs=fabs(other.secs-other2.secs); return t3; } bool Time::operator!=(const Time &other) { return (hrs!=other.hrs || mins!=other.mins || secs!=other.secs); } [/code] this error apear while runing the prog. [code] : error C2804: … | |
hi ^^.. i have another question ,, it may sound stupid but what should i do , i'm just a beginner ^^.. if i am reading a digit from a file as a char. and then i want to read it again as an int.as an int. with other digits. … | |
Hello; steps are correct; there is no error ; but when running the prog. this what apear :(its in attach) this is my code and the main: [code] template<class Type> void sortQueue(queueType <Type> & q1) { queueType <Type> q2; queueType <Type> qresult; Type min=q1.front(); q2.addQueue(min); while(!q1.isEmptyQueue()) { q1.deleteQueue(); while(!q1.isEmptyQueue()) { … | |
Hello About half year ago I was interested in Direct3D 9/10 programming, but I released that DX isnt for me. Im not really interested into a game development. I know C/C++ basics, some Win32 API and some QT4 basics. Now, I'd like to try OpenGL. I am looking for a … | |
Hi, I am reading ahead for a C++ class that i am taking next quarter. I just read stacks and queues and know how to implement both seperately. I was wandering if there is a program that has been written in which both stacks and queues were implemented in one … |
The End.