52,676 Topics

Member Avatar for
Member Avatar for 666kennedy

i have a formula, it is basically the result of two other previous calculations and it gives me an eror message saying that i cant use it as a function [CODE] ERRORC = (( target1 ) - ( OUTC ) )(OUTC)(1 - OUTC); [/CODE] target one is selected at the …

Member Avatar for Ancient Dragon
0
146
Member Avatar for TylerTCF

Thanks for your help earlier with the file input everyone...I have another question to ask of you. I am trying to check two vectors against each other to see if the "timeanddate" match up. Then try to output the ones that do match. I am getting errors from the if …

Member Avatar for mitrmkar
0
143
Member Avatar for Lensva

Say i ask a user to input a number, which will be the return value of one of my class members. How do i make it so that it would redirect me another class member, depending on the number input?

Member Avatar for Lensva
0
113
Member Avatar for Traicey

This program is using setw() and setfill() it supposed to output the stars I have included the sample output at the end of my project I hope u gona be able to read the code cause my coding does not print the stars the way they have to be instead …

Member Avatar for Narue
0
2K
Member Avatar for 666kennedy

firstly id like to thank people for helping me with my earlier problems. anyway, for this program im working on, i want the user to be able to select between two patterns. eg. pattern1 makes x=1 and y=0 pattern2 makes x=0 and y=0 i tried using if statements, but it …

Member Avatar for Narue
0
150
Member Avatar for Jboy05

Do you see anything wrong with this if so let me know [code=cplusplus] #include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main () { int num; ifstream AFile; AFile.open('a:\\OddFile.txt'); AFile << "Enter an integer number please: "; cin >> num; If (num % 2 = 0) AFile << …

Member Avatar for Jboy05
0
151
Member Avatar for TylerTCF

Anyhelp with the ostringstream and datastream line would be appreciated. Can't seem to get the data to actually write to the text file...No data in results.txt, but the file is created by the program when I run it... [CODE] ofstream DataFile3("results.txt"); cout<<"Writing...Please wait...."<<endl; for (a=0; a<Search.size(); a++) { cout<<Search[a].date<<" "<<Search[a].time<<" …

Member Avatar for Narue
0
139
Member Avatar for Jennifer84

I have a wondering. I have put this code in the richTextBox1 event handler. What happens is when you have written 11 characters, the 10 previous characters turns blue. What I wonder is that this code selects and deselects these characters wich can result of "blinking" in the textbox sometimes …

Member Avatar for Jennifer84
0
113
Member Avatar for 666kennedy

this isnt working, i think it has something to do with the natural exponential, its a calculation of the sigmoid function. it basically should read 1/(1 + e^-((W1A*pix1)+(W2A*pix2))) this is what ive coded [CODE] OUTA = 1/(1 + exp -((W1A * pix1) + (W2A * pix2))); [/CODE] please help me.

Member Avatar for 666kennedy
0
335
Member Avatar for krichard89

For the code posted below, a hangman game, how would I make it so after the conditions in the loop are evaluated, it goes back and asks for another letter input without an infinite loop? [code=c++] // Kevin Richard // Hangman.cpp // Basic Hangman console game /* Changelog: -added char …

Member Avatar for Ancient Dragon
0
88
Member Avatar for TylerTCF

Need a recommendation on how to proceed with this task...I am starting new in C++ (after taking it in high school 11 years ago it has been forgotten and has changed alot). I have put the code I have below and some sample lines of data...any recommendations on how to …

Member Avatar for vijayan121
0
185
Member Avatar for sisi

Hello guys, I just join your site to get help about my coding programme class c++. I do have to modify my programme that the out put will show the form sum=1+3+5+7=16. Can you please help me out thxx . Programme is adding odd integer : [code=cplusplus] # include <iostream> …

Member Avatar for lAmoebal
0
92
Member Avatar for scorpio40330

I have an upcoming assignment, in which I have already completed. But I was just curious if anyone could look it over and give me some input on it. I am pretty confident that I have done it correctly. But I think I have became particularly attached to this assignment …

Member Avatar for Daphene
0
136
Member Avatar for Mahen

Hi, Merry cristmas and Happy new year to everyone. I am writing this because i am having problems with my compiler Borland C++ Builder 6 Evaluation Version :-( The problem is that after I have designed a GUI program, Build it and run the executable, Windows declares a Stack Overflow. …

Member Avatar for Mahen
0
521
Member Avatar for alkeshtech

[B]why is this keep giving me same 2 numbers?[/B] [code=cplusplus] #include <iostream> #include <iomanip> #include <ctime> #include <cstdlib> #include <windows.h> using namespace std; int generate(int,int); int _tmain(int argc, _TCHAR* argv[]) { int random[1000]; for(int n=0;n<1000;n++) { random[n]=generate(1,50); cout << random[n] << endl; } system("pause"); return 0; } int generate(int min, …

Member Avatar for alkeshtech
0
319
Member Avatar for Jennifer84

I use this code in a multilined textBox event handler. When writing: "hellowalker" in the textBox:s first line, "walker" turns blue. If you delete this and go down a line and write the same: "owalker" turns blue and down a line again "lowalker" turns blue. What could be wrong with …

Member Avatar for Narue
0
98
Member Avatar for Traicey

I have done most of languages, I did arrays[] to all of them and of cause except COBOL, I can declare them(arrayz[]) yes that one is easy, but manipulating them thats where the problem starts, I never get any program right if I have to use arrays, Im not gona …

Member Avatar for Traicey
0
129
Member Avatar for bhoot_jb

i am working with a matrix manipulation program...consists of a matrix class and its member functions.. i have also overloaded << and >>...so dat dey can read and print d whole matrix at one statement.. the code of these overloaded operators is something like this.. [CODE] // for >> (cin) …

Member Avatar for bhoot_jb
0
176
Member Avatar for LindaWiklund

Hello! Trying to use regexp in glib but I cannot get it to work. I would like to have a regular expression to describe: [2003-03-11 13:14:12.111] letters letters.:1234 Hello I have tryed the following expression in 'regular expression testers' and there this works: ^\[\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2}\.\d{3}\]\s\w*\s*\w*\.+\w*\:\d{4}\sHello But not with glib's regexp. Why …

Member Avatar for LindaWiklund
0
114
Member Avatar for AntiBNI

I want to display an image right after the dialog is drawn and keep it for like 3 secs (an intro). I know how to do everything but i can't find a message that is sent when the MFC dialog is displayed, "NOT" about to display. I can show messages …

Member Avatar for Ancient Dragon
0
83
Member Avatar for gehad3003

how can i make the program print stars instead of typed letters. like password. for example enter the username: mike enter the password: **** **** = 1234 mike will go to a username variable and 1234 will go into password variable thanks

Member Avatar for gehad3003
0
119
Member Avatar for Traicey

On C++ we have two different types of function which are non-returning value or void function and returning value function and what I would like to know under which condition you use either of those functions, and when do you know that you have to pass by reference(ByRef) or by …

Member Avatar for Traicey
0
169
Member Avatar for rsk8332

Hi, Suppose I have a character array array1[]={A,B,B,B,A,A}. Now I want to declare a structure with a pointer in it and make each array1 element point to the previous element.For example last array1 element 'A' will point to the previous 'A' which will point to 'B' and so on. Can …

Member Avatar for Agni
0
153
Member Avatar for knight fyre

I'm trying to use composition. I included the header file and made a type of the class that is contained within the owner class but I keep getting errors like this: [QUOTE]c:\documents and settings\cheryl\desktop\parking lot system\person.cpp(7) : error C2614: 'PERSON' : illegal member initialization: 'DATE' is not a base or …

Member Avatar for knight fyre
0
530
Member Avatar for kartouss

Hello i am using AES to encrypt/decrypt data/ pixel values.. saved in a file myfile.txt and the AES encrypts tha data and writes the ciphertext in a file ciphertext.txt When decrypting the data i am getting some of the pixel values decrypted correctly followed by garbage.. Code to open myfile.txt …

Member Avatar for kartouss
0
578
Member Avatar for davye_l

I have a base class name Elec, and 3 derived class.....capacitor, resistor, and series_circuits. I also used composition on class series_circuit to use capacitor and resistor object. In series circuit, i have declare an elec pointer to object.....Elec* *component. in the implementation, somewhere i wrote down component=new Elec*[10];..in another method, …

Member Avatar for davye_l
0
76
Member Avatar for amitahlawat20

I am not able to figure out how to calculate the determinant of a matrix whose size and elements are to be taken from user. Could someone help me !!

0
79
Member Avatar for lostandconfuzed

Alright, so I'm having some trouble with ye olde factorials. "bool C++ beginner=true", folks. I'm struggling with this here problemo. Here's the formula I need to compute : C(n,k) = n!/k!(n-k)! And I have no idea how to go about this. First, I have to implement a function for the …

Member Avatar for vmanes
0
127
Member Avatar for k2k

I followed the book to finish this 2 node linked list, and however it looks like there is only one node in it. (temp has replaced the head???? my book example coded this way which i don't fully understand) Is anything wrong in here? And i think my output function …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Agni

hi, I have a XML in a String coming from an external input. The problem is that this string is getting some junk characters appended to in the last. I need to find the lenght of the string only till the correct part. once i get this lenght i can …

Member Avatar for Agni
0
209
Member Avatar for Jennifer84

This code tells what position the cursor is in a textbox. Let us say that this position is 10. Now is my question, is it possible to know what character it is if any on position 9 in the textBox. Is it possible to put the character on position 9 …

Member Avatar for Jennifer84
0
168
Member Avatar for snorri

Hi all, I've recently had some issues with the streaming operator and the order of precedence used when mixing it with the member function operator (operator .) Example code is below. [code=cpp] #include <iostream> #include <vector> using namespace std; class A { public: A() : i(0) {}; int f() { …

Member Avatar for snorri
0
106
Member Avatar for prs55

Hi,I am implementing graph ,all function works except the Hamiltonian part(1 function and 2 private method).Every time i compile,it shows two error message,,i don't know how to use adjacency list or is there any way to implement it using the class declaration as given above...I have main problem on my …

Member Avatar for prs55
0
110
Member Avatar for Jennifer84

Is it possible to [COLOR="Red"]get [/COLOR]the cursor position in any way in a textBox and also [COLOR="Red"]set [/COLOR]a Cursorpositon. I have tried out this syntax but am not sure if this is correct: I dont know what this returns. [code] textBox1->Cursor->Position::[COLOR="Red"]get[/COLOR](); textBox1->Cursor->Position::[COLOR="Red"]set[/COLOR](); [/code]

Member Avatar for Jennifer84
0
116
Member Avatar for lAmoebal

Hey guys, I have a problem. When I try to run a program that I've compiled with VS 2005 on a different machine that does not have VS, I get this error. "The application failed to initialize properly (0x0150002). Click on OK to terminate the application." I've installed the Microsoft …

Member Avatar for Ancient Dragon
-1
247
Member Avatar for skatamatic

I'm getting pretty bored with the straight-forward database work we're learning in school. I've got very solid understanding of intermediate C++ concepts, but we have yet to implement any graphics! When I was a lot younger I mastered QBasic (which isn't much of a feat) so I should have a …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Jennifer84

If I have a textBox that contains this information below wich meens 2 lines. What I am trying to do is to search this textBox with a while loop for the word: "five" and when found this word, I wonder if this word has any kind of substringindex where I …

Member Avatar for Jennifer84
0
136
Member Avatar for krichard89

I am implementing code to program a hangman game in C++ for my CSP class. So far, I am working on the random string function as well as calling the body parts as void functions. I am attempting to compile what I have as of now to see how it …

Member Avatar for skatamatic
0
173
Member Avatar for crisjoyce

Need to be informed on how to code and also how my coding should follow.If possible need to be shown with an example of how to code.Ihave never done this so please assist me.

Member Avatar for skatamatic
0
125
Member Avatar for noktasizvirgul

Dear all, I need to find the max width of Binary Search Tree. It means the biggest number of nodes in a level among all levels. [URL=http://www.imgloadtr.com/#aca41035095c6695489f975721df328a.jpg][IMG]http://www.imgloadtr.com/pics/aca41035095c6695489f975721df328a.jpg[/IMG][/URL] In the figure the maximum width is 4, since level 3 has the biggest number of nodes, which is 4. I will be …

Member Avatar for Narue
0
188
Member Avatar for Crazycfk

i seem to have messed up on the out put some how [code] #include<iostream> #include<cmath> using namespace std; char ans[16]= {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; int digit2value(char); char value2digit(int); int conversion(int, int, int); int reversing(int p[],int i); int main(){ int radixa,radixb,number; cout<<"radix a(10) ";// i am going to changing program cin>>radixa; // after i …

Member Avatar for skatamatic
0
145
Member Avatar for CoolGamer48

Hey - sorry if this is the wrong place for this. I have this basic chess game I'm making, and I'm done with the first alpha build of it. It works fine when I compile it on my own computer, but when I bring the exe to a different computer, …

Member Avatar for CoolGamer48
0
197
Member Avatar for Jennifer84

I have a wondering that if I write a specific word in a textBox in C++ .NET like for example the word: "Name" What I wonder here is that when writing this word it will turn to the color of blue when the word is written. So if there is …

Member Avatar for Jennifer84
0
118
Member Avatar for lostandconfuzed

[QUOTE]Hey all, i'm having a bit of trouble with this - it's a program that should display the factorials of all numbers from 0 to k in the range 1-10. here's what i keep getting: Enter a number to see factorials for: 10 10! = 100 9! = 90 8! …

Member Avatar for Narue
0
109
Member Avatar for tabasaki

I am trying to create a program that will do address standardizing. I have to compare two files. One file is a master file that has all the correct info I will need to use. The other file is a collection of data received from seperate individuals. Not all individuals …

Member Avatar for tabasaki
0
126
Member Avatar for amitahlawat20

My instructor at my engineering institute has given the following assignment question: Create a database of scientists and labourers and maintain the same by making use of inheritance. We haven't been taught the database connectivity with program execution, so that's not to be used. I wrote the following code: [code] …

Member Avatar for Ancient Dragon
0
155
Member Avatar for nileshjaiswal

[COLOR="Red"][B]Plz help me tell me how we can convert the C program in C++ I working on OCX(Active X controls) plzzzzzzzzzzz...............reply[/B][/COLOR]

Member Avatar for Jx_Man
0
56
Member Avatar for pelino

in need your help on how to write a source cod program in c++ to output the sum of natural numbers of 45 using the go to statament

Member Avatar for Narue
0
48
Member Avatar for Jboy05

how do i write a C++ function called RepeatingWords that displays a word (passed in through a string type parameter) N (also passed through a parameter) times. Then, write a calling statement for the function

Member Avatar for Narue
0
98
Member Avatar for experimenter

Hello, I need a program that calls out some code after every x milliseconds and in the same time it waits for keyboard strokes to change the interval time and code what is called out. I should use threads (one for waiting for keyboard input and others for intervalled wake-ups). …

Member Avatar for experimenter
0
106

The End.