51,593 Topics

Member Avatar for
Member Avatar for NicAuf

Ok so my first thread got deleted, due to spam. However, I still need help with my program. So here's my program description. [B]Electronic submission: You are to electronically submit your assignment through Moodle at clasess.cs.siue.edu. Objectives: Loops and decisions. Problem Description Write a program to simulate a game of …

Member Avatar for teppuus
0
120
Member Avatar for The Midnighter

Okay, so I'm trying to write my own little version of Tic-Tac-Toe - and YES, I did use the search function and I saw the billions of threads involving Tictac toe. HOWEVER, I am not looking for code written for me already, I don't want to be lazy I want …

Member Avatar for hollystyles
0
111
Member Avatar for winky

Hey guys, First time poster here.:) Just started my C++ career and am working with pointers/arrays at them moment. I was wondering why I cannot take a user input ('n') to create the size of the array "y". Can anyone show me why this syntax is wrong? Thanks for the …

Member Avatar for hinduengg
0
268
Member Avatar for mattarov

OK, as you can probably tell from my code, I am trying to design a program that will keep requesting a password until the right password is entered (using a Do While Loop with char instead of int). this is my code: (this is one of my first solo pieces …

Member Avatar for Salem
0
83
Member Avatar for vimalfor5

:) hi all. Please help me .... Currently im working wid a bank project in .net....... !!! so please reply me wid .. the basic thing that are needed for developing a project like that. please reply me .... !!! give me sugestions ... regarding the different acount types how …

Member Avatar for vimalfor5
0
177
Member Avatar for vimalfor5

:) hi all, please help me... perhps im using djgpp for my cpp projects ... i cannt able to use the dos.h functions such as the delay(); if anybdy knw about how to use it please reply me ...!!!

Member Avatar for vimalfor5
0
119
Member Avatar for ziz_300

in the function "deal", I want to call the function "add", but it doesn't work .... any suggestions? [code] #include "DeckOfCards.h" int DeckOfCards::deal() { int y,z; int y1,y2; char x1,x2; char cards[13]={'A','2','3','4','5','6','7','8','9','0','J','Q','K'}; char deck [260] ; for (int i=0; i< 260; i++) deck[i] = cards [i % 13]; y = …

Member Avatar for WaltP
0
88
Member Avatar for Duki

Could somone give me a hint as to why my division by 0 check doesn't work? [code]istream & operator >> ( istream & is , Rational & r ) { char x ; is >> r.num >> x >> r.den ; if ( r.den == '0' ) { cout << …

Member Avatar for Duki
0
149
Member Avatar for annagraphicart

Okay, So i'm close to finishing up my program. I just need a few more things. By the way, all of you are AMAZINGLY great. I appreciate all the help. Alright... My program outputs Names, their Bowling scores, and How many points they have received (the points still need to …

Member Avatar for Dave Sinkula
0
106
Member Avatar for curt22

How do I get the text out of a listview in report style into an array? I want it to be something like this: [[item1],[subitem1]],[[item1],[subitem1]],[[item1],[subitem1]], Here is some of my code: [CODE] hWndListView = CreateWindowEx( 0L, WC_LISTVIEW, "", WS_VISIBLE | WS_CHILD | LVS_REPORT, 0, 21, 340, 190, hWnd, (HMENU) ID_LISTVIEW, …

Member Avatar for curt22
0
112
Member Avatar for Zazabazulla

hi, i would like to convert a string into an array. ex. string = "i love c++"; array[1] = "i"; array[2] = "love"; array[3] = "c++"; can somebody help me pls? thanks alot

Member Avatar for Salem
0
42
Member Avatar for annagraphicart

I'm almost finished with this program. All i need to do is fix up the points system. Right now I have it where it numbers everything, which i'm using as the points system. take a look [CODE=C++] #include <iostream> #include <string> #include <istream> #include <fstream> using namespace std; int main() …

0
81
Member Avatar for annagraphicart

Can I get my output in my program to be sent to another program like Wordpad or Microsoft word?

Member Avatar for annagraphicart
0
137
Member Avatar for vn_utami

hii,I'm a new programer.. and now I have a homework. And I stuck with this,, This homework about find 100 first number.. I have one solution but,this solution is using syntax goto().. and the problem is my homework is restricted using syntax goto()..this my first solution #include<conio.h> #include<stdio.h> #include<stdlib> main() …

Member Avatar for Killer_Typo
0
137
Member Avatar for annagraphicart

Take a look at the "points" section. It says that i haven't declared the string name for "scores"... but scores is an int name not a string. Whats going on? #include <iostream> #include <string> using namespace std; int main() { const int MAX=4; std::string names1[4] = {"Anna" , "Jenny", "George" …

Member Avatar for annagraphicart
0
88
Member Avatar for riham

how can calculate the memory address of lower triangular array such this one : 20 7 5 60 8 0 10 0 0 0 0 0 ineed just the formula 2calculate just the upper traingular and cancel the zero i tried 2use svd ( singal value decomposition) but i really …

Member Avatar for iamthwee
0
136
Member Avatar for jhen
Member Avatar for Dee76

Everything compiles no warnings or errors, but after I run this I get a core dump if I uncomment "delete [] a;" at the end of the main() function. It seems to run correctly if I leave "delete [] a;" commented out? Any suggestions will be appreciated. [code=C++] #include <iostream> …

Member Avatar for Dee76
0
155
Member Avatar for n.aggel

this is the final version of the priority queue i implemented {with some of your help!}... the problem is that when i profile the code with valgrind, it shows that i have a memory leak.... i can also see that, if in my code i make certain test_points{where i pause …

Member Avatar for n.aggel
0
418
Member Avatar for riya100

How to calculate time complexity of the following piece of code?? [code] assume n= 2^k i=n; while (i>=1) { j=i; while(j <= n) { <body>> // Needs theta(1) j=2*j; } i=i/2; } [/code]

Member Avatar for riya100
0
109
Member Avatar for teppuus

Hello, I need to complete a selection sort (descending order) on a string that contains 3 letters and one number. This is the function I wrote so far, but it doesn't sort properly. It is sorting, but I can't figure out its scheme. Any tips? Thanks! (The arrays are parallel. …

Member Avatar for teppuus
0
235
Member Avatar for abdullateef

hi everyone I wanna to ask about calculation of 2-D array address I remember that equation that can do this for an array, char a[R][C]; Address of an element a[N][M]; = baseAddress + elementSize * (N*C+ M); Is it right?? :) Other thing, is it deferent if the array is …

Member Avatar for Narue
0
106
Member Avatar for Duki

hey guys. the following code should return a percentage of the current values of the object. I keep getting 0 returned. If this isn't enough code let me know. [code]Money test = ourAmount.percent ( 10 ) ; test.output ( ) ;[/code][code]const Money Money::percent ( int percentFigure ) { return ( …

Member Avatar for Ancient Dragon
0
205
Member Avatar for gidos

what book will i use for internet opening and function with using visual c++ 6.0 compiler please help me gidos

Member Avatar for Aleckaola
0
25
Member Avatar for maverick786

Can anyone suggest an algorithm or function to generate combinations/ permutations of a group of substrings stored in a vector. The substrings consists of 3 letters and the resulting string combinations should be of a size that is a multiple of 3.

Member Avatar for Salem
0
68
Member Avatar for jdphenix

Hello everyone.. I small snippet about me. This is my first post, and I just decided to start coding in C++ a couple weeks ago, so needless to say, I'm a newbie. I bought a Beginning C++ book to help me with initial concepts. On to the reason for my …

Member Avatar for jdphenix
0
687
Member Avatar for annagraphicart

[code] #include <iostream> #include <string> using namespace std; int main() { string names[4] = {"Anna" , "Jenny", "George" , "Michael"}; int score[4]; for(int i = 0; i < 3; i++) { cout << names[i] << ": "; cin >> score[i]; cin.ignore(); } //sort by score for ( int i = …

Member Avatar for Duki
0
273
Member Avatar for annagraphicart

Sorry about that. Please help here. Extremely important. It says I need to declare the "i" in scores[i] But im not sure what to do. [code=cplusplus] #include <iostream> #include <string> using namespace std; int main() { //Declaring variables string names[3] = {"John","Anne","Mary"}; int score[3]; int points[3]; //Ask for scores. cout …

Member Avatar for Ancient Dragon
0
172
Member Avatar for annagraphicart

Can ya'll take a look at this? [code=cplusplus] #include <iostream> #include <string> using namespace std; int main() { string names[3] = {"John","Anne","Mary"}; int score[i]; cout << "Enter Scores" << endl << endl; cout << "Anna Marie: "; cin >> score[i]; //sort by score for ( int i = 0; i …

Member Avatar for Ancient Dragon
0
80
Member Avatar for JohnHull

:sad: Write a C++ template class Nvector that enables arrays with negative subscripts to be defined. The class should be usable in the following code fragment: [code]Nvector<double> a; // instantiate double array class a.resize(-10, 10); // allocate array from locations -10 to 10 for(int i=-10 ; i<=10 ; ++i) a[i] …

Member Avatar for Salem
0
118
Member Avatar for metalbassist56

Hey, I'm new to programming and I was wondering if anyone could tell me how to create a simple Yes/No interface for a program so I can figure out how to do things like that...

Member Avatar for Duki
0
153
Member Avatar for kazek

Am currently working on a car dealer system. Am trying to design the system in a way that a user can view the number of vehicles available, the type, e.t.c and obviously the user can make a purchase. At the moment am just trying to deal with the basics. Am …

Member Avatar for Salem
0
3K
Member Avatar for Donnovan

Hi, I'm using Microsoft Visual C++ and I keep getting this error referring to this one line in my main file . can someone HELP ME ? [code]#include <iostream> using namespace std; int main() { float tempFahrenheit; float tempCelsius; float Omrekenen; cout << "Geef de temperatuur in Fahrenheit: "; cin …

Member Avatar for Donnovan
0
200
Member Avatar for punizzel

Hey guys, Big problem. So heres the deal. I am trying to make a program which reads a two dimentional array from a file then prints it out on the screen. The the user inputs a treshold number. What the out put is supposed to be is to find a …

Member Avatar for iamthwee
0
78
Member Avatar for JBI_UK

Hi there, I downloaded all the things i need for the building of the Firefox source code but the thing is, I want to be able to actually edit it before i build it... You know so it doesn't say Firefox just like what Flock did. If anyone knows how …

Member Avatar for Salem
0
88
Member Avatar for wendy2learn

Have you ever used Quincy 2005 for writing and compiling your c++ codes? Quincy 2005 is simply an open source IDE for c/c++. It's simple. However, this application frequently gives me a headache. What I can describe from this IDE is it is unstable, clearly unstable. Recently, I worked on …

Member Avatar for Salem
0
780
Member Avatar for z_imi

Hi. I want to connecting modem and dial a number when my program start to running, but I do not know how access to ?!! Can anyone help me?

Member Avatar for Salem
0
32
Member Avatar for ampdoc

I need some info on how to write a C++ program,that starts with a while staments.I need the cus balance not to exceed the credit limit.

Member Avatar for iamthwee
0
79
Member Avatar for madhan

[COLOR=#000000]I am executing all my c/c++ programs in VC++ cmpiler.[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=blue]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=maroon]<iostream>[/COLOR] [COLOR=maroon] [/COLOR] [COLOR=blue]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=blue]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=blue]int[/COLOR][COLOR=#000000] main() [/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=blue]int[/COLOR][COLOR=#000000] age; [/COLOR] [COLOR=blue]char[/COLOR][COLOR=#000000] sex;[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]cout<<[/COLOR][COLOR=maroon]"please input your age:"[/COLOR][COLOR=#000000]; [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]cout<<[/COLOR][COLOR=maroon]"please input your sex (M/F):"[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#000000]cin>> age; [/COLOR] [COLOR=#000000]cin>> …

Member Avatar for Tom_Zeke
0
5K
Member Avatar for xerenist

i don't know if it allowed to ask like this,, but this triangle make me confused(coz i'm new in C++) but,can u teach me how to make it?/explain how am i supposed 2 do? the triangle is like this: [code] 1 2 3 4 2 3 4 5 6 5 …

Member Avatar for Ancient Dragon
0
118
Member Avatar for wendy2learn

I'm having problem with my program here. See, I have an array of char* as data member in Action class. With the help of getFirst() function, I'm returning the value of the first element in the array. But, when I tried to print out this value in the test.cpp, it …

Member Avatar for Salem
0
117
Member Avatar for Jaav

Hello. I have knowledge in both VB.NET and C++. What I can do in C++ is mostly console apps that are made from scratch. What I know in VB.NET is using the Visual 2005 express edition to make a simple game. I'm planning on starting making a big but still …

Member Avatar for Narue
0
164
Member Avatar for n.aggel

I want to output code{formated with color} to a .doc{or .odt} file or an html file for a report.... How can i do this? PS::tell me if i don't phrase the question well, so i can rephrase it!

Member Avatar for GreenDay2001
0
98
Member Avatar for suziperu

hello friends i need help about the "Extension" part pls help me.. a menu driven c++ program using case/switch that gives the user the following options: A. Fahrenheit to Celsius Converter B. Celsius to Fahrenheit Converter C. Inches to Feet converter D. Feet to Inches Converter The program should work …

Member Avatar for GreenDay2001
0
224
Member Avatar for pop007

Hello all, I have done with this code Output : Enter n = 5 2+4+6+8+10 = 30 I compile with Turbo C++, version 3 here is my code [code] #include <iostream.h> #include <conio.h> void main() { clrscr(); int n, sum=0; cout<<"Enter n= "; cin>>n; for (int i=1; i<=n; i++) { …

Member Avatar for WaltP
0
106
Member Avatar for brijendramishra

[code] #include<iostream.h> #include<conio.h> typedef class { int i; float b; public: obj() { cout<<"\n Is this constructor \n"; } void show() { cout<<"fkjhfg"; } }obj; void main() { clrscr(); obj o; o.show(); getch(); } [/code] In this code ,of Anonymous class object is calling the show function ,but its constructor …

Member Avatar for VatooVatoo
0
91
Member Avatar for annagraphicart

Okay, I need my output to be numbered. I know the index code works but idk how to use that. However, i also need to know how to do the if/else statement, so that if the output is "0", then they dont get an index, they just recieve "0"

Member Avatar for Narue
0
355
Member Avatar for Duki

Could someone possibly post a brief explanation of the differences between member and nonmember operator overloading?

Member Avatar for iamthwee
0
93
Member Avatar for Renjith VR

Can we fix the terminal(console) size according to data displayed? I am working in c++,and my O.S is kubuntu.Using c++ i can align the data displayed in cosole, but before i want to change the terminal to a particular size.otherwise it is not aligned the data. Any way to change …

Member Avatar for Narue
0
148
Member Avatar for Ashu@sym

I want to assign a TCHAR char array to std::string in VC++ 2005, how should i do that? a simple assignment gives error i.e TCHAR buffer[MAX-1]; std::string data; //some operation for filling the buffer data = buffer; //This gives error Plz help me in doing this operation.

Member Avatar for Ashu@sym
0
2K

The End.