49,757 Topics

Member Avatar for
Member Avatar for sidra 100

hi i have created a code to merge two char arrays for assignment plz can u guide me is it ok.how much marks can i get 4 it out of 20. [CODE]#include <iostream> using namespace std; //declaring the functions void merge(char[],int, char[], int,char[],int); void sort(char[] ,int); void display(char[],int); main() { …

Member Avatar for sidra 100
0
99
Member Avatar for codecutie

I keep getting an error when using option 2. Could someone please point me in the right direction. [CODE]#include <iostream> using namespace std; int num; int Size; int choice; int *currentArray = 0; int *tempArray = 0; int index, oldSize, newSize; struct nodeType { int info; nodeType *Link; }; nodeType …

Member Avatar for programmersbook
0
134
Member Avatar for jediahsan
Member Avatar for free_eagle

Hi there ! How r u? Ohh I really need your help great programmers ... I am new for programming and I am trying to do things by myself but here I need your help :-| I would like to draw something in C or C++ but I got no …

Member Avatar for peter_budo
0
4K
Member Avatar for lkegley

I am working on a programming that uses classes to complete several tasks. I have successfully created a program that reads in the opponent name, home score, and opponent score for a team's season. Now I'm trying to go back and write a method that can be used to output …

Member Avatar for jonsca
0
98
Member Avatar for Shoh

Hi! When i try to see how work the ready programms from book, it is compile, run, and closes window right away. How stopped prog after it finished to see and analyse all? Thanks a lot. I have Vista, Dev C++ 4.9.9.2

Member Avatar for Shoh
0
120
Member Avatar for agoessling

I have written a daemon in CPP that listens to the serial port and alters a mysql database when necessary. This works fine, but now I need to communicate to the daemon after it has been started. There is an event that happens on average at most once a week …

Member Avatar for Ancient Dragon
0
139
Member Avatar for C++ Beginner

Here is the problem: Write a program that displays the name of each month in a year and its rainfall amount, sorted in order of rainfall from highest to lowest. The program should use an array of structures, where each structure holds the name of a month and its rainfall …

Member Avatar for C++ Beginner
1
228
Member Avatar for samsons17

hi...i'm trying to improve a simple program that i made... this is a cash receipt program... to avoid the program form crashing,i insert a code of cin.fail() which will determine wether the data type the user entered is correct or not... if the data type is wrong that the program …

Member Avatar for valtikz
0
195
Member Avatar for Mclovin1234

Hi i need help on my assignment what i have to do is Enter data into a 5 X 7 array. The example i have is Please enter the numbers in the first row: 1234567 Please enter the numbers in the second row: 1234567 Please enter the numbers in the …

Member Avatar for necrolin
0
104
Member Avatar for happymadman

How can my "Player" class access a function of my "Map" class? The place I want it in is commented. Thanks. [code] #include <iostream> #include <string> using namespace std; class Map { public: Map(); ~Map(); void Map::print(); int Map::sendroom(int x_coord, int y_coord); private: int i; int p; int w; static …

Member Avatar for valtikz
0
116
Member Avatar for yingyuan

banking system : -all the bank accout can be created, accessed,and clossed later. -three type of account:current,saving,fixed deposit. -each custormer can open more than one type of accounts. -The transactions are deposit, withdraw, and view balance -the account created with a deposit and creation date. -After that money can be …

Member Avatar for valtikz
0
227
Member Avatar for Snapster5

heya couple errors in this code, not really sure what to do... line 30 expected constructor, destructor, or type conversion before '(' token line 30 expected `,' or `;' before '(' token line 32 expected constructor, destructor, or type conversion before '<<' token line 32 expected `,' or `;' before …

Member Avatar for Snapster5
-1
47
Member Avatar for valtikz

Is there a possible way I can connect the WNDCLASSEX to the class in Gtk::WIndow??! because I'm working on tray icon of gtkmm program for Windows. I already have a TrayIcon using this : [CODE]Shell_NotifyIcon(NIM_ADD, &g_notifyIconData);[/CODE] But there is no function, it only display an icon it doesn't go in …

Member Avatar for valtikz
0
197
Member Avatar for Snapster5

heya i get these two errors before i compile... line 23 expected primary-expression before "else" line 23 expected `;' before "else" [CODE]int count = 0;for (count = 0; count <= 10 ; count ++) { for (count = 0; count <= 10 ; count ++) { cout <<"\n\n\n\n"; cout <<"Please …

Member Avatar for jonsca
0
64
Member Avatar for Lilal

Hey, I have a file of RGB values, seperated by : just so they count as a single line. I'm importing these into a string vector and sorting these so they come out sorted from 0:0:0 to 99:99:99. [CODE] vector<string> sV; ifstream in("Images\\Stage1RBGList.txt", std::ios::binary); string word; cout << "Starting Compression..." …

Member Avatar for Lerner
0
330
Member Avatar for eduard77

Can anyone tell me what is wrong with this code? #include <iostream> #define MATRIX_DIMENSION 4 int main(int nArgs, char** pArgs) { int nDim = MATRIX_DIMENSION; double fMatr[MATRIX_DIMENSION*MATRIX_DIMENSION] = { 1.0, 2.0, -1.0, -2.0, 1.0, 3.0, -1.0, -2.0, 2.0, 1.0, 1.0, 1.0, 3.0, 1.0, 2.0, 1.0, }; double fVec[MATRIX_DIMENSION] = {-6.0, …

Member Avatar for Lerner
0
81
Member Avatar for WaIas

Hi guys, I am creating a monopoly game for C++ and i am trying to use an array of spaces to display the game board but everytime i try to run it, it wont work..i realize my code is probably awful, but its what i have. any help is appreciated.. …

Member Avatar for jonsca
0
89
Member Avatar for sirdanman10

I am trying to get a handle on two things: building strings, and reading a file. I am trying to write a function that will pull a line from a file and put it into a string. I want to use it in a loop, so I am having the …

Member Avatar for sirdanman10
0
116
Member Avatar for tnimblett

It just crashes out. [CODE]{ int i,j; ifstream input; input.open("carpark.txt"); { for (i=0;i<j;++i) { input >> employee[i].spotnumber; input >> employee[i].driver_name; input >> employee[i].car_reg; } while (!input.eof()) j++; } }[/CODE]

Member Avatar for jonsca
0
99
Member Avatar for kellnerq

Hi all, I would like to ask you all for some help. I need to write a program that allows me to have a circle radius as input and then print out the diameter, circumference and area of that circle. Easy task but i have to put the calculations in …

Member Avatar for kellnerq
0
80
Member Avatar for Snapster5

Hi working on this lab, and theres mistakes were i know im not writing the code correctly but i am trying, really am. If anyone couuld help me out with these errors, or notice were i am writing incorrectly can you post correct way. thank you.. Description: Create a program …

Member Avatar for Lerner
0
146
Member Avatar for Snapster5

ok it almosts works, the program stops when i enter the first at_BAT AND then hits and wont loop to get the neext persons at bat and hits. error: 36 no matching function for call to `toupper(std::string&)' ok here is ther part that isnt working... for (int i = 0; …

Member Avatar for mrnutty
0
91
Member Avatar for astala27

Q. Using recursion, write [B]a[/B] C++ function into [B]b[/B] to convert an arbitrary integer n>=0 into binary. Call this function in the main program with the argument n (That's an easy part I can do that). In example; input n=27, output 11011. If anyone can help me with this question, …

Member Avatar for n1337
0
107
Member Avatar for maiar

hi how to make function to find if matrix is symmetric or not in c++ ?? matrix could have any size from 1X1 to 10X10. i use programe borland c++

Member Avatar for William Hemsworth
0
44
Member Avatar for oneat

How you got any examples of programs which communicates by PS/2 ports to mouse etc ?

Member Avatar for oneat
0
97
Member Avatar for mrquiglz

I need help coding a npc interaction using a gui including buttons and an exit option.

0
40
Member Avatar for Dewey1040

this is the error i'm getting. g++ main.cpp g++ universityperson.cpp /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main' collect2: ld returned 1 exit status make: *** [universityperson.o] Error 1 I'm not going to post all the code i have but here is my makefile main file and universityperson files …

Member Avatar for nezachem
0
233
Member Avatar for Skeen

I'm making this snake game, and I've created a class to handle the snakes (players and AI snakes), this works out quite well, however, at the moment I'm declaring my main snake (player 1), as global, in terms of: [CODE] class Snake { //... Lots and lots of code. } …

Member Avatar for Skeen
0
212
Member Avatar for suho

My program dynamically allocates memory to an array of objects : [CODE] class particle { public: int x[D],shifted,ID; particle() { shifted=0; ID=-1; } }; // Array of all the particles particle* particles; int main() { for(a=0;a<s_num;a++) { particles= new particle[num]; //some code ........ ........ for(i=num-1;i>=0;i--) { delete (particles+i); } } …

Member Avatar for Narue
0
122

The End.