49,756 Topics

Member Avatar for
Member Avatar for torbecire

I am trying to replace all characters in text with char [*]. It only displays the first four. If i type anything after 6 digits it displays 5 [*]. Could anyone help me?. Look at the function twoplayer(w). Thats the one i am concerned with now [CODE=c] #include <iostream> #include …

Member Avatar for John A
0
99
Member Avatar for Duki

Hey everyone, I have a question on one of my homework problems. I'm in basic structured programming; C++. The question states the following: The root of the quadratic equation ax^2 + bx + c = 0, a ≠ 0 are given by the following formula: [U]-b +/- √b^2 – 4ac[/U] …

Member Avatar for Duki
0
2K
Member Avatar for SHWOO

I cannot figure out why I am getting these two errors error C2504: 'arrayListType' : base class undefined error C2143: syntax error : missing ',' before '<' [code] // Jon Wayman // class that is derived from arrayListType template <class elemType> class unorderedArrayListType: public arrayListType<elemType> { public: void insertAt(int location, …

Member Avatar for Narue
0
137
Member Avatar for ReDeViL

Hi guys need a little help for my homework, any help is greatly appreciated. :cheesy: Qn 1. pointers i have a problem with passing pointers to functions code is as follows: [code] //function declaration void computeProduct(product *pProduct,int *pBest); //function call computeProduct(product *pProduct,int *pBest); //function definition void computeProduct(product *pProduct,int *pBest) { …

Member Avatar for ~s.o.s~
0
224
Member Avatar for tinie

I have read that iterators are used to traverse through the elements of container classes. If I wanted to use iterators to move through elements of a 2d vector, how am I going to declare it and use it? Maybe what I said was not too clear, let me rephrase …

Member Avatar for Narue
0
4K
Member Avatar for Duki

Hi all I am new to C++ and have a few questions if that is ok. I would like to get into good habbits early (i.e., using switch instead of 12 if else statments) and was wondering if anyone knew right off how to get a timer to time the …

Member Avatar for Narue
0
136
Member Avatar for mrparthi

I am using Intel D915GAV Motherboard with Windows XP SP2. While try to use TCPP (C++), the screen becomes blank and hangs. when i open the task manager and fount that NTVDM.exe utilizes 90-95% of the CPU. After i end the task of NTVDM.exe then the system works fine. I …

0
41
Member Avatar for soveijn

i dont have any code yet because im not sure of the best way to go about doing this. 1. i have multiple dlls that i want to statically link to my program 2. when my program starts i want all the dlls to do their own intialization 3. i …

Member Avatar for soveijn
0
74
Member Avatar for trunks1212

Ok, I'm writing code for Tic-tac-toe game and I'm almost done I just can't get it to stop when Player 2 wins. It works fine when Player 1 wins or if there is a tie. I know it's short notice, but can anyone help me before tomorrow morning. I would …

Member Avatar for John A
0
154
Member Avatar for nadith_cs

this is a program which will help you to find the roots of any given function.... and please note that i have made comments on the lines which compiler gives an error. actually it compiles really well. i think it is something wrong in the values which are assigned to …

Member Avatar for iamthwee
0
109
Member Avatar for kobi

Hello , When im trying to compile this code it goes well,but when i run the prog i just get a flash of the cmd ,please can you tell me what i doing wrong?-im using the compailer of dev c++ [code] #include <stdio.h> #include <stdlib.h> #define _WIN32_WINNT 0x0501 #include <windows.h> …

Member Avatar for Ancient Dragon
0
325
Member Avatar for Rickenbacker360

Hey again, I was hoping someone here could look at my code and tell me why I'm not receiving the correct output. Here's what I'm supposed to do:Write a program that asks a user to enter an integer, say n,then list all the numbers that are less than or equal …

Member Avatar for psycotic_furby
0
117
Member Avatar for tinie

I am currently programming in Linux using the g++ compiler. I was trying to make an open function that would open a file and store its contents in a 2d vector. I was successful at doing the said function. I thought I was done with it, but I realized that …

Member Avatar for Lazaro Claiborn
0
131
Member Avatar for Tauren

Alrighty, ur in the game you click a NPC, you click to buy an item. It then sends a packet to the server seeing if you have enough money an so on if you do it sends a packet back? Would that be correct? If not can someone help me?

Member Avatar for WolfPack
0
119
Member Avatar for andy257

Hi All, I am starting out with learning the basics of C. Once i have learned that i would like to know how to make the programs look visually better. Things like drawing coloured boxes/ windows etc. One of my learning programs is a simple calculator. If i want to …

Member Avatar for ~s.o.s~
0
140
Member Avatar for degamer106

I'm having a bit of a problem with function style cast with classes. When I exit the function I expect an instance of Database to be returned. This instance would then be copied into the db declared in main. I've writtien a copy constructor and it works fine (tested by …

Member Avatar for Ancient Dragon
0
177
Member Avatar for ziman

Hi all, I have a project made in C code which generates the position and the velocity of a pendulum. I want to represent it in a graphic while the points are being generated but I don´t knom how I can do it or if it´s possible. I don´t know …

Member Avatar for Ancient Dragon
0
76
Member Avatar for GreenDay2001

In earlier versions of c++, there was a function gotoxy() which could take me anywhere in the screen. Its available with borland compilers now too but not with visual c++ express. Is there any substitute for that.

Member Avatar for GreenDay2001
0
475
Member Avatar for elcrapo

I am having troubles getting this program to generate random numbers. Right now i have it set up to only generate 1 and 19. I do not know how to generate random numbers. :confused::?::twisted::eek: thank you if anyone can help my dumbass. [CODE=c]// Exercise 12.16: MultiplicationTeacher.cpp // This game asks …

Member Avatar for WaltP
0
136
Member Avatar for md_salman

while installing microsoft visual C++ 6 I am getting the error message "ODBC sqlInstallDriverManager" failed and the program is not installed correctly. Please tell how to remove this error.

0
45
Member Avatar for Tauren

I am using VC++... I need to know how to add a header to the Application, Can someone Joe, or anyone else Give me Step By step on how to do it... Say I had a header called Bob.h and I wanted to add it to my application Tauren That …

Member Avatar for John A
0
127
Member Avatar for degamer106

This might seem like a silly question, but how do I read in a newline char, by itself, as input? For example, if I gave the user a choice to enter a string for a new filename, or let them just press ENTER for some other choice. forgot to add …

Member Avatar for WaltP
0
4K
Member Avatar for degamer106

If I have a dynimcally allocated array of objects and each of these objects contains a pointer to a string, when I use the 'delete' function to return memory, do I have to go through each array element and free each string individually or does the 'delete' take care of …

Member Avatar for Salem
0
128
Member Avatar for oolatin79

Hi guys/gals, I'm having a problem with a function that overloads the input stream. The problem is that the getline crashes on the second iteration of the while loop: [code] //overloaded input operator istream& operator>>(istream& is, vector<EmailHeader>& ehVec) { EmailHeader headerInput; cout << "Enter an email Header: Ctrl-D to quit" …

Member Avatar for Ancient Dragon
0
126
Member Avatar for Matt Tacular

i'm making a program in c++ that gets a binary number and converts it to an integer. But of coarse i've hit a snag, I need a way to store a binary number that's any length, then run through the number to see if a 2 or something is there, …

Member Avatar for Matt Tacular
0
87
Member Avatar for amirwan
Member Avatar for John A
0
106
Member Avatar for degamer106

So in my class we just finished covering the topic of constructors and destructors. Now, my teacher has given us a lab where we have to create these classes and each of them must have a ctor/dtor. The problem I'm running into is..well.. it would be easier to describe in …

Member Avatar for degamer106
0
373
Member Avatar for raydogg57

I need to make a program that asks the user to input a number of strings, and then outputs the string database. The program should maintain a string database where each record is a string. The program keeps reading strings that the user has typed, and inserts the string at …

Member Avatar for WaltP
0
528
Member Avatar for Rickenbacker360

Hello, I have an exam on wednesday and was given a practice exam but I'm having a little a bit of trouble. 8.What will be displayed on the screen after the following statements are executed in a C++ program? [code] [COLOR=#000000] int a=5, b=2, c=1, d=3;[/COLOR] [COLOR=#000000] int t;[/COLOR] [COLOR=#000000] …

Member Avatar for Rickenbacker360
0
116
Member Avatar for n.aggel

Hi, i have five{number is unimportant} independent objects{the purpose is to model sensors} and i want them to write sequentially{not in the same time}, some info to a file{all to the same file} and at screen... i was thinking to implement a fileWriter class, that will create the file...and then …

Member Avatar for John A
0
134

The End.