51,593 Topics

Member Avatar for
Member Avatar for DigitalPackrat

I searched the forums for Windows API tutorials and have found [URL="http://www.winprog.org/tutorial/"]this[/URL]. Is it necessary to do everything manually like in the tutorial and after getting the hang of it move on to QT or should I jump into QT right now?

Member Avatar for eager
0
253
Member Avatar for n8makar

sort of a noob as i have been doing c++ for only a couple months now. my problem is that i am using a function to pass data from a file into an array then into a .out file. the function im using to read the data from the file …

Member Avatar for vmanes
0
518
Member Avatar for wiggles

I have to write a computer program to play connect 4 against a human player by friday. I have no clue even where to start on this. I have already written the game, i just dont know what to do about the computer player. Please Help me!!! p.s. What is …

Member Avatar for Narue
0
2K
Member Avatar for daviddoria

I keep getting this error: this application has failed to start because MFC80.dll was not found. In the past, when I've got this error i've played around with "Runtime library", switching it from /MDd to /MD to /MTd......etc etc then I turn off and on the manifest files then I …

Member Avatar for daviddoria
0
105
Member Avatar for swaret

Hi all! i write because ive a little problem with a c++ binary tree. I wrote all the cose, and the program runs, but i have a dubt: the destructor and the copy constructor. i wrote in 3 files: nodo.h, albero.h and albero.cpp (nodo means node, albero means tree) [code] …

Member Avatar for swaret
0
129
Member Avatar for octavia

what kind of variable is UINT anyway..........? in VC++ Anyone can help me? I still cann't understand it's detail usage. :-/ :icon_question:

Member Avatar for Narue
0
329
Member Avatar for buvnut

hi there i was wondering if any1 could help me with this problem. i am a beginner at c++ and my coursework is asking me to create a program with a hash function and i am lost! could any1 tell me how to implement this? here is my problem - …

Member Avatar for Narue
0
110
Member Avatar for RatherBeInVegas

I have a program that provides different responses each time it is ran. I created it via an empty project and the output is simple cout statements to the DOS window. Is there a way to convert a C++ program I created into an Windows application that displays output and …

Member Avatar for William Hemsworth
0
107
Member Avatar for daviddoria

I seem to be able to write as many characters as I want into "buffer" even though I declare it as length 1 - why is this? [code] string teststring = "teststring"; cout << teststring << endl; char buffer[1]; itoa(34567,buffer,10); teststring.append(buffer); cout << teststring << endl; [/code] Thanks! Dave

Member Avatar for Narue
0
114
Member Avatar for sohamghosh

I was just asking, is it also possible to define 2D arrays? If so, how do I pass them into the functions and use them in an address book? As in can I say employee.name[x][] when I use things like strcmp, puts, or gets, or must i say employee.name[x]?

Member Avatar for Narue
0
79
Member Avatar for i_raghuveer

Problem Description: You are to write a golf game that allows the user to play one hole, a 280 metre par 5. For each swing, the player chooses a club and then the program generates the distance hit for each shot, updating the distance to the hole accordingly. Play proceeds …

Member Avatar for i_raghuveer
-1
132
Member Avatar for timdog345

I need to use a for loop to print out the odd numbers between 25 - 1. program2 1) I also need to use a for loop to prompt user to input two intergers: firstNumber and secondNumber (firstNumber must be less then secondNumber) 2) Outputs all odd numbers between firstNumber …

Member Avatar for hammerhead
0
126
Member Avatar for Aashath

Hi All, This is regarding VC++ 6.0 compilation problem that i have faced . I deleted my "Temp" folder and trying to compile my code , but VC++ doesnt allow me to compile my code without that folder .can anyone help me in this ? why VC++ requires temp folder …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Sky Diploma

Hi all, I am currently working on a program which tests whether 2 numbers multiplied produces a PALINDROME. An example of a palindrome is 16461 which can be read same from both ways hence i devised a test. [CODE=cplusplus]#include <iostream> #include <string> using namespace std; char pali(char orig[100]); int main() …

Member Avatar for Sky Diploma
0
164
Member Avatar for allialli

i am having problems with this assignment : Write a program that prints an N by N box on the screen as follows: Please enter a number between 2 and 10: 5 ----- | | | | | | ----- Press any key to continue . . . Note that …

Member Avatar for WonderWomen204
0
101
Member Avatar for lianaconda

What's the best way to swap two arrays? Would it be better to copy each position into a new array and then assign the array a new name? Or would it be better to use pointers? What would the algorithm be if I were to use pointers or a dynamically …

Member Avatar for dougy83
0
117
Member Avatar for DevC++4.9.9.2

Hey, im trying to use pointers with a struct. I am having an issue in the function searchData. I can not get the pointer to compair with the string, it is still just compairing the actual adress or something else. Not sure if i even passed it right. Please help …

Member Avatar for VernonDozier
0
166
Member Avatar for binnaman

this is what I have so far. I did most of the work just that my output is screwed [code=cplusplus] #include <iostream> #include <fstream> #include <stack> #include <cmath> #include <cassert> using namespace std; int number(); bool Valid( stack<int> s, int row){// This will find out if there is a valid …

Member Avatar for Nick Evan
0
146
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
117
Member Avatar for fredmac

This suppose to be a simple coin toss program that tells when the coin is fliped it reads heads or tails and this is wat i got so far #include <stdio.h> int example (int h,int t ); int main() { int x1, x2; int x; printf(" Enter 5 to run …

Member Avatar for jephthah
0
203
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
80
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
348
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
105
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
92
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
64
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
83
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
130
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
145
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
153
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
125
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
196
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
141
Member Avatar for SofMy

I can't run the programme, please assist to check the error. Thank you in advance for your assistance. Question: 1. Develop an application program that creates a list of integer test score value in an array, sorts the array in increasing order and searches it for a test score value. …

Member Avatar for Salem
0
216
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
159
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
161
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
109
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
109
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
151
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
128
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
307
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
121
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
124
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
186
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
118
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
135
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
180
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
82
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
147

The End.