51,593 Topics

Member Avatar for
Member Avatar for computerages

Hello, I am writing a program in C++ to open a web page in a browser using command line. Suppose, I enter open [url]www.google.com[/url] It should open Google's home page in a browser. I want to make this program multithreaded so a user can open as many web pages as …

Member Avatar for computerages
0
197
Member Avatar for dani2010

What is a seed in c++? "Call a function to populate the array to perform the following: Ask the user for a [I]seed[/I]"

Member Avatar for gusano79
0
83
Member Avatar for lordofdarkness

hi everyone. i need to find all possible paths for directed graph with dynamic programming. let me clarify. i have a path from 1 to n and this is a straight line. every line has a value. i need a way where the cost is smallest. i take inputs as …

Member Avatar for gusano79
0
115
Member Avatar for bijayswain

Can anyone tell what is wrong in the below program.I want to ping an ip address which is entered by the user. [CODE]#include <iostream> using namespace std; int main() { char ip1[30]; cout<<"Enter the Ip Address"; cin>>ip1; system("ping ip1"); return 0; }[/CODE]

Member Avatar for Bench
0
100
Member Avatar for lotrsimp12345

basically i have 4 files 2 contain the following data . Trying to find out data which is common and not common in both files and write it out to files common and not common. It almost works except for it doesn't compare the last item in the list before …

Member Avatar for TheArchitect
0
497
Member Avatar for Japus

Hello I'm trying to copy a variable from a vector into an array (with a few steps in between) As you can see from the code, I take a random piece of equipment from the vector of equipments and insert it into the inventory (which is an array). The line …

Member Avatar for thelamb
0
2K
Member Avatar for Skeen

Okay, I'm making a game, and I need to use random inside a class, however I can't figure out how to seed the randomness into the class, so atm I'm getting the same random each time. I've tried stuff like srand(time) in main, however, that doesn't apply to the class, …

Member Avatar for Skeen
0
112
Member Avatar for kele1

I have to write a program that converts Fahrenheit from 0 to 212 to floating-point Celsius with 3 digit of precision. The output should be printed in two right-justified columns of 10 characters each and the Celsius should be preceded by sign for both positive and negative values. please help …

Member Avatar for kele1
0
311
Member Avatar for frankenclyde

is there anyone who is kind enough to share a program code "Inventory System with database "f.stream"".. just a simple program! with add, delete and search!

Member Avatar for Narue
0
27
Member Avatar for grafas7

hi, i have a task i dont understand, im working with C++ Borland 6. my task is to create array ,which will read text from .txt file (any text,with any number of words). What is important i need to count those letters by rating them, and then range (counted letters) …

Member Avatar for mrnutty
0
100
Member Avatar for kellnerq

Question- Write a function that displays at the left margin of the screen a solid square of asterisks whose side is specified in integer parameter side. For example, if side is 4, the function displays: Sample Screen Display **** **** **** **** i have come this far but i get …

Member Avatar for sidra 100
0
3K
Member Avatar for Happy Family

struct date{ int y; int m; int d; long int calculate_date(/*struct variable */) { //.... } }; void main () {/*here how to call function and define struct var*/ }

Member Avatar for Narue
-1
84
Member Avatar for seam

Project 1 Leap year calculation (Leap year is a year that has 366 days, a year that has 365 days is not a leap year) Write a program that will accept a positive integer ( the year to be tested) from a user. If the user inputs a 0 or …

Member Avatar for seam
0
91
Member Avatar for gehring

Hi, I have the following examplde code. [CODE=C++] // TestProject.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "TestProject.h" #include <iostream> #include <vector> #include <windows.h> #define UNICODDE using namespace std; int main(void) { CString test; std::vector<std::vector<CString> > your2darray; std::vector<CString> row; row.push_back("col 1.1"); row.push_back("col 1.2"); row.push_back("col …

Member Avatar for Ancient Dragon
0
298
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
102
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
137
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
102
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
122
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
141
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
231
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
215
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
105
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
118
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
230
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
49
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
199
Member Avatar for hardlynoticable

Hi Guys, Take a look at the following code snippet: [code] <%@ Page Language="C#" ContentType="text/html" ResponseEncoding="UTF-8" %> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <script runat="server"> void Page_Load() { Response.Write("This is a test"); } </script> </body> </html> [/code] It outputs the following: [code] This is a test <html xmlns="http://www.w3.org/1999/xhtml"> <body> </body> </html> [/code] (note …

0
67
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
65
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
346
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
84
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
120
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
101
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
85
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
147
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
93
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
112
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
45
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
101
Member Avatar for mrquiglz
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
238
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
219
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
125
Member Avatar for jawadmardan

plz send me a passward protect code in c++ (visual stodio) if i inter name and looking like ****

Member Avatar for Nick Evan
-2
31
Member Avatar for HaveHave2222

Hello, I have written the same code in c# and i seem to have any problems? I use 'procexp.exe' to check the performance. In the case of 'c++' the VM (Virtual Memory) and PM (Physical Memory) becomes larger every minute. There is also an I/O block with a lot of …

Member Avatar for HaveHave2222
0
125
Member Avatar for idgeza

Hi all, I have a following code below, where I generate a matrix and lots of data, and finally I print out that data into one .dat file. Now I would like to share these data into many files, e.g. 4 .dat files in a continual way. To see what …

Member Avatar for Murtan
0
120
Member Avatar for Japus

Hello Let me describe the problem: I've got 1 base class item which is inherited by a few other subclasses. Everything goes well until I put an object from a subclass into an array of items I lose the specific data of the subclass. I think I need something of …

Member Avatar for Japus
0
93
Member Avatar for rsaska

I have created a procedure, exitFailure() that is invoked if a file doesn't exist: [CODE] int exitFailure() {//start exitFailure() printf("Failure, hit any key to exit and press enter.\n"); scanf("%d", &counterx); return 1; }//end exitFailure() [/CODE] Below is the snippit of code that invokes exitFailure() [CODE] inFile.open(inputFilename, ios::in); if (!inFile) { …

Member Avatar for Sodabread
0
156

The End.