49,756 Topics

Member Avatar for
Member Avatar for iCare

I'm using Borland C++ and i need to make program where you enter a string in which the words are seprated by space. After input i need to sort these words into alphabetical order, but something is wrong. Cause when i enter like " x b a" it prints out …

Member Avatar for Narue
0
170
Member Avatar for tootypegs

Hi, my question is as follows. I have 2 computers, connected with a crossover cable. I would like to be able to copy files from computer 1 to computer 2 across the cable. I aim to create a program in c++ that wil allow the tranfer of files between the …

Member Avatar for vijayan121
0
74
Member Avatar for MadeInHungary

I like to receive data on SOCKET. I call the recv() method with required params: char* buff = new char[len]; memset(buff, 0, len); if(recv(sck, buff, len, MSG_PEEK) == SOCKET_ERROR) { cerr << "String Receive Error - code: " << WSAGetLastError() << endl; } The recv() method copies data to the …

Member Avatar for MadeInHungary
0
147
Member Avatar for swuwarrior

Im sure i have a syntax issue or just not doing something right as i am new to c++.. i am generating an error code in my program ... here is my code [code] #include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <string> #include <string.h> using namespace …

Member Avatar for ShawnCplus
0
120
Member Avatar for wijitha

hi... I'm new to the cppunit. I'm using cppunit framework for my c++ program. I want to build my program using a makefile. can anyone help me to compile my program using a make file. wijitha

Member Avatar for Duoas
0
438
Member Avatar for kv79

Hi to all, I have Windows XP professional SP2 and Dev-C++ and when i go to the Device Manager -> Keyboard-> Resources i see I/O Range 0064-0060 and the ports have also addres. And all other things wich have addres. My question is ,is it really addres or i am …

Member Avatar for Salem
0
157
Member Avatar for sathishkumar.e

Hi to all, I'm a newbie to C++,i have a doubt in the ofstream write function. I have a code like this ofstream* rgpostrm [BASE_LAYER]; rgpostrm [BASE_LAYER] = new ofstream (pchCmp, ios::binary | ios:ut); and some write function like rgpostrm[ENHN_LAYER]->write(rgpvoenc [ENHN_LAYER]->pOutStream () str(), rgpvoenc [ENHN_LAYER]->pOutStream () ->pcount ()); where the …

Member Avatar for Ancient Dragon
0
114
Member Avatar for anwar7517525

I am Anwar as a intermediate level currently programming practice in c, c++ and java . In following programs I confused in these expressions that expressions are same but result are different on these results few teachers said it is the problem of compilers. [U][B]In Turbo C 3.0[/B][/U] [ICODE] main() …

Member Avatar for Salem
0
152
Member Avatar for IAmCalledDave

I'm working on an MP3 player for Visual Studio:C++, and I've already realized this is wayyy more than I thought it'd be. I'm at a standstill right now with 2 things, any help would be greatly appreciated: 1) Playing back an MP3 file. I'm building this thing from scratch, and …

Member Avatar for jbennet
0
107
Member Avatar for lrnzsmok1

Purpose: Create a C++ class; use operators, overloading, member functions, friend functions, constructors and private data. • Make the data members private. (This means that the non-member functions below will have to be friends of the Date class). • Create a member function called ‘set’ with the same arguments, and …

Member Avatar for Ancient Dragon
0
118
Member Avatar for dsuh06

for the for loop for ( ; *source!='\0'; source++) what is the purpose of the semicolon in the for loop ? thank you!

Member Avatar for Ancient Dragon
0
104
Member Avatar for cl3m0ns

I am writing a program and I have a .txt file that has a some information about people. I would like to write that information into an array and then display that information about the person. The problem is that I don't know how many names will be in the …

Member Avatar for WaltP
0
158
Member Avatar for onelilfizzle

i made this just the other day, and as a new member i thought i would share this lil thing. many have probably already seen it, but its just a fun lil thing from a beginning programmer. [code] /* Name: Go Starwars! Author: Evan Cohen Date: 27/11/07 19:11 Description: Runs …

Member Avatar for zandiago
0
102
Member Avatar for cl3m0ns

i have a class called Employee and a method in that class called display(). When that method is called it displays a first name and a last name. In my int main() i have... [CODE] int main() { Employee emp; Employee* ptr; return 0 ; } [/CODE] I was wondering …

Member Avatar for WaltP
0
97
Member Avatar for zandiago

Good day. My semester of c++ is coming to an end. I've got to complete a total of 7 assignments within the next 3 weeks. I've completed 5 out of the seven. I've got two left (1 has a separate thread by itself). So you can also take a look …

Member Avatar for zandiago
0
954
Member Avatar for phalaris_trip

So let's say I have a class called CSprite which loads a sprite sheet. Within that class will be at least one CAnimation object which takes user-defined snippets from the sprite sheet and loops them.. so for example I might want: CAnimation m_AnimNormal, m_AnimOnFire; inside the actual CSprite object. The …

Member Avatar for phalaris_trip
0
98
Member Avatar for dukedoc

I'm having trouble writing a function that searches through an array of structures for a string value. The structure looks like this: [code] struct Computer{ string Model; string Brand; int Price; }; [/code] For some reason I have no problem finding the Price values, but the function that is supposed …

Member Avatar for Ancient Dragon
0
94
Member Avatar for kim3485
Member Avatar for nbs_87

Hiii,, i'm really confused in here,, can someone plzz answer this question: Write a program that plays the famous Rock/Paper/Scissors game against a user. In this game the user will enter his choice and the computer randomly selects a choice. The winner of the game is determined as follows. If …

Member Avatar for WaltP
0
81
Member Avatar for #include<DAN.h>

I was just wondering if anyone knew how to run two linked output windows at the same time or if it is even possible. I'd appreciate any and all help. Thanks!!! ^_^

Member Avatar for #include<DAN.h>
0
76
Member Avatar for Sturm

For homework I'm apparently supposed to implement some functions defined in [icode] <algorithm> [/icode]. So this is what I have so far: [CODE=c++]template <class I> bool m_equal( I b, I e, I b2 ) { for ( ; b != e && b == b2; b++, b2++ ); return b …

Member Avatar for Sturm
0
124
Member Avatar for tarekkkkk

just plz 1) correct my faults and help me 2) on freazing the command by:getch(0) 3) where to put it and the include<conio.h>,plz i have a test tomorow on devcpp compiler: #include<stdio.h> void fill-mat(int x[10][10],n) { for(int i=0;i<n;i++) for(int j=0;j<n;i++) scanf("%d",&x[j]); } void print-mat(int x[10][10],n) { for(int i=0;i<n;i++) for(int j=0;j<n;j++) …

Member Avatar for tarekkkkk
0
115
Member Avatar for scorpio40330

I have spent HOURS looking at this problem, and have absolutely no idea where to begin! I'm not asking for anyone to do it for me, just point me in the right direction PLEASE! For each of the following problems, use the top-down modular approach and pseudocode to design a …

Member Avatar for ithelp
0
97
Member Avatar for caylyn

hello.....to evryone im jerlyn......im first year college..taking up accountancy... i regester hr coz we have subject about C++ and database..... i cant understand some code that our tchr want us to input or type..... like...... *what the difference about [B][U]the do while loop [/U][/B]and [B][U]the while loop[/U][/B] *what [B][U]getch[/U][/B] stand …

Member Avatar for ithelp
0
102
Member Avatar for everyday

Hi everyone, my name is Jono and I know basically nothing about programming, and wonder if some of you nice folks could answer a question for me. When a program is waiting for you to type something in, say a maths game waiting for the correct answer, is there a …

Member Avatar for Ancient Dragon
0
85
Member Avatar for dsuh06

if " int*& ptr " is declared as a parameter of a function, what does it do? for example: findMax(int arr[], int n, int*& ptr)

Member Avatar for dsuh06
0
69
Member Avatar for alleli

hei please... i need a simple game just using loops and arrays... kindly jelp me...huhuhu:( :'( thanks in advance

Member Avatar for WaltP
0
90
Member Avatar for sonsofliberty84

I am trying to modify a program to read in a file that will then output it to a new file without all the whitespace in between the data. This is so I can convert it to a csv file and read it into paraview to make a visualization of …

Member Avatar for Ancient Dragon
0
298
Member Avatar for mastro

Ticket Reservation System You are asked to implement a ticket reservation system for a travel agency so that staff can book flights for their passengers. You are required to use CPP principles you have learned from the class to implement and to realize the basic system functions. The principles includes: …

Member Avatar for mastro
0
409
Member Avatar for gchasproblem

Hi. I am having a problem with one of my class functions. It compiles fine and works "when it wants to". I am using the search_inventory function in my add_product function of the same class. sometimes it works perfectly fine however sometimes the search_inventory function causes an infinite loop when …

Member Avatar for Ancient Dragon
0
110

The End.