49,761 Topics

Member Avatar for
Member Avatar for allialli

I have another assignment for class that I am having some difficulties with. I seem to be able to write the program, except for the fact that it keeps looping over and over and I'm not quite sure how to stop this. Could anyone please help?? Thanks! This is the …

Member Avatar for WonderWomen204
0
115
Member Avatar for bleonard989

I am having problems with my linked queue adt. I don't get any error messages, but it just isn't doing anything in the menu driven client code. It's just to test the queue to make sure it works correctly. The most problem I'm having is with my print function. If …

0
77
Member Avatar for JoBe

Hi ladies and gents, Wanted to ask a simple question probably for you guys and the answer will maybe be simple aswell, but, I thought, what the heck, I'll go for it :) It just seems strange that when everyone tells to use <iostream> instead of <iostream.h>, <cstdlib> instead of …

Member Avatar for Ancient Dragon
0
343
Member Avatar for WonderWomen204

Would anyone be able to help me with this assignment. I pretty much almost got it, but I'm still stuck. Here is the assignment: Write a program that asks the user for two integers; call them num1 and num2. Make sure the number is between 1 and 9 (including 1 …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Cyb3rAssasin

Hi guys, I'm working on building a server package similar to xampp, and I've done some googling on opening ports with c++ but I cant find a straight answer. Can someone please shed some light on this for me. I'll keep searching google in the mean time. Thanks Guys.

Member Avatar for Ancient Dragon
0
70
Member Avatar for mikky05v

Ok i need a program that finds the greatest common divisor of two integers. 1) if A/B is 0 then B is the greatest common divisor 2) if A/B is not 0 then plug B into A and the remainder into B 3) repeat the process I have to use …

Member Avatar for tymk
0
88
Member Avatar for therwi

I'm a computer science student and I have HW for Computer Grahphics my hw talk about How to use a CreateFont() function in MFC If every one have information about it can help me, thanks

Member Avatar for Ancient Dragon
0
63
Member Avatar for Black Magic

Hi, i was just wondering how i could do this, Say if i made a char array, password, could i change the input to *'s as soon as the user entered them without seeing normal char's Thanks.

Member Avatar for dougy83
0
79
Member Avatar for alwayshere

#include<iostream> #include<string> #include<stdio.h> using namespace std; int main(){ char s[100]; cout<<"enter the string :"<<endl; gets(s); //memcpy char a[100]; memcpy(a,s,strlen(s)+1);//here if we decrease bytes to be copied to a value less than length of s i.e.(strlen(s)), then s is getting destroyed ...some garbage value is coming cout<<" a : "<<a<<" s …

Member Avatar for dougy83
0
127
Member Avatar for lianaconda

I'm a little confused about empty arrays. I'm supposed to write code for a function of type boolean that returns whether an array is empty or not. This function is a part of a class called Sequence, and takes no parameters. Earlier in the code, I included a typedef so …

Member Avatar for lianaconda
0
137
Member Avatar for Moporho

I am trying to write a function that will read one value of an array. I must prompt the user for an index and then read the its value. I am having a horrible time and need help. [code] // read_one_value(A, n) prompts the user for an index i and …

Member Avatar for Moporho
0
151
Member Avatar for jade09091990

[code]how to validate alphabet character input? for example, i have these choices: a, b, c, d,,, the program will run but erratic. for example you've entered "d3" , how to solve this problem?[/code]

Member Avatar for Salem
0
56
Member Avatar for hsma

I am currently working on a mini project for my class. the project is designing a game called etch n sketch. you first etch out a map then quit the game after youre done. then sketch the etch you just created. the problem im having is the scoring system. score …

Member Avatar for vmanes
0
124
Member Avatar for Drezta

i'm practicing my use of functions at the moment by writing a program to convert pounds to euros and vise versa but when i try calling the functions that do the converting i get a load of 'expected primary-expression' errors. what dose that actually mean because i'm not really sure …

Member Avatar for Drezta
0
194
Member Avatar for yazooney

Hi, I'm not sure there is an answer to this question, but here goes. I have a program written in c++ (compiled in windows using devC++) and I can run dos commands easily using the "system function". I can also launch the cygwin bash shell by using this function. Obvously, …

Member Avatar for dougy83
0
136
Member Avatar for kartouss

Hello, I am using a code to generate random numbers upto 32 char... The problem is that i want to display the 32 characters each randomly because the code is displaying the same char 32 times and i want to get the 32 chars generated randomly... The code is:- [code=c++]#include …

Member Avatar for kartouss
0
155
Member Avatar for varsitygirl_13

Hi, I have this factorial function that I have working just great, but I am not really sure how I am supposed to print the local variable and the recursive call parameter. Any help would be greatly appreciated! Thanks. [code=cpp]#include <iostream> using std::cout; using std::endl; #include<iomanip> using std::setw; unsigned long …

Member Avatar for varsitygirl_13
0
158
Member Avatar for hostintruder

Hello friends , I got an important coursework to submit . Let me explain, the coursework consist of a file .. which we must sort, search and we must event create a y-sort algorithm. After much struggle, i was able to use the stringtokensier to input the data from the …

Member Avatar for hostintruder
0
104
Member Avatar for Lensva

works, allows entering a user selected amount of strings, however when i try to display, it displays only the last string, not the whole 'database', whatever you'd call it :) the main question is what is wrong and also, is there any way to not to ask a user to …

Member Avatar for Lensva
0
105
Member Avatar for rikkie

Hi guys, I'm trying to use a nested for loop to change the first 'o' it finds while testing to an 's' and then exit the loop immediately after that. This is what I have, but it currently changes every second 'o' to 's' [code] for (int i = 0; …

Member Avatar for vmanes
-1
149
Member Avatar for BBustos

My code requires the validation of a string that starts with two letters and ends with six numbers. So, an example would be [B]br474897.[/B] This is what I got so far: [code] bool GetNID(char buf[]) { int i= 0; int length; bool valid = false; cin.getline(buf, 30); length = strlen(buf); …

Member Avatar for vmanes
0
124
Member Avatar for alexhkleung

I can't identify the problem can somebody help me? [B][COLOR="Green"] objects.h (abstract base)[/COLOR][/B] [CODE=C++]#ifndef objects_h #define objects_h #include "colorScreen.h" #include "maincontrol.h" #include <ctime> #include <string> using namespace std; class objects { public: virtual ~objects(); virtual void print(const MainControl &inMain)const =0; protected: objects(); objects(const int& inX, const int& inY,const int&inScore); ... …

Member Avatar for alexhkleung
0
300
Member Avatar for alexhkleung

hi all I'm trying to read a document char by char my question is how do I read the spaces as well? Thank you!

Member Avatar for alexhkleung
0
116
Member Avatar for BBustos

I cannot figure out how to validate a string so that it accepts both uppercase and lowercase letters as in a name. Here is the code: [code] bool GetString(char buf[]) { int i; int length; bool valid; cin.getline(buf, 30); length = strlen(buf); for (i = 0; i < length; i++) …

Member Avatar for BBustos
0
121
Member Avatar for kse989

I need help writing code for my print function in a linked queue adt [B]queue.h[/B] [CODE= CPP] template <class ItemType> // record type for nodes on queue struct NodeType { ItemType info; NodeType* next; }; template <class ItemType> class QueueType { public: QueueType(); QueueType(const QueueType &); // Copy constructor ~QueueType(); …

Member Avatar for Ancient Dragon
0
184
Member Avatar for complexcodes

I have working version of code but mu ostream<< function should print data acoording to the row and column specified. Here is the codes :- [CODE]// // 4/11/2008 // This is a header file of Array2D class which stores 2D arrays #ifndef ARRAY2D_H #define ARRAY2D_H #include <iostream> using std::ostream; using …

Member Avatar for vmanes
0
114
Member Avatar for code12

I'm having problem with this code. Here's what I'm trying to do. I want the user to enter the firstname, last name of the person whom he wants to delete from the phonebook. then I try to compare the data entered by user with the names already stored on phonebook. …

Member Avatar for code12
0
132
Member Avatar for kartouss

Hello, I am calling a c++ dll in vb... Everything is working fine.. Just i am unable to write the vb code in order to perform the require action... Code for calling the c++ dll in vb [code=visual basic 6]Private Declare Function do_encrypt Lib "AES.dll" (ByVal text As String, ByVal …

Member Avatar for kartouss
0
161
Member Avatar for Jon Jon

Hi, I want to be able to use std stream objects to manipulate files, but some of the files are too big. I want to be able to do the folowing: >int64_t fileSize; >strm.seekg(0,ios::end); >fileSize = static_cast<int64_t>(strm.tellg()); >cout<<"File size is "<<fileSize; This code will output -1 if the size of …

Member Avatar for Ancient Dragon
0
80
Member Avatar for usaxray25

Hey guys-- I have been lurking on here for some time as a C++ student. I have a project to complete using cstring and strcpy() as a function within a "simple" program. The psedocode goes as follows: --program accepts 2 string array inputs(using getline) 40 total chars for str1 and …

Member Avatar for usaxray25
0
145

The End.