51,593 Topics

Member Avatar for
Member Avatar for dexter1984

[url]http://i126.photobucket.com/albums/p98/justln/untitled3.jpg[/url] Which codes do I use so that the answer is not out of place? I tried using \t and setw but it doesn't work :(

Member Avatar for dexter1984
0
155
Member Avatar for Evan M

I have a vector array of a class that's giving me some crap. I would beat it up, but that might result in some innocent circuits getting damaged. Class: [code=c++]class Font { public: Font(); ~Font(); int style; int ptSize; std::string name; TTF_Font *font; }; Font::Font() { style = TTF_STYLE_NORMAL; ptSize …

Member Avatar for Evan M
0
102
Member Avatar for zarf

Hi all i am a newbie in C++, i am currently doing my FYP and i need some help on it. I am using visual C++ version 6.0. Firstly, i have 2 machines A ( the client ) and B ( the server ), A is supposed to send a …

Member Avatar for zarf
0
117
Member Avatar for leouel

does anybody know how to create a program with vertical chart using graphics.h pls help.. <snipped email>

0
51
Member Avatar for adrian116

1. const int* a; (what the difference between const int *a and why pointer need to be const?) 2. short b[10]; (is the content of b are all short type?) 3. float* const c[]; (i think this should be wrong due to the size of array c is not assigned) …

Member Avatar for adrian116
0
105
Member Avatar for JackDurden

How do I insert a character into a number array? Is it possible? a and b are constants. [CODE]for(int i = 0; i <n; i++) { pointer[i] = new int[n]; } for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { pointer[i][j]=1;/ pointer[a][b]="*"; //<---- } }[/CODE]

Member Avatar for rhoit
0
98
Member Avatar for core2d

I have this problem that states that: LL be a doubly linked list that has 2 headers L and R. Each record has: llink, data, and rlink as field. So llink is the prev pointer and rlink is the next pointer. Here is the code to reverse the list, but …

Member Avatar for rhoit
0
98
Member Avatar for Randomppl

i wanna noe how to write a code that will read lines from a file and then put those lines into an array. and will this make a double of arrayB if arrayA is empty and arrayB is filled? arrayA[10]=arrayB[10] help of any kind will be greatly appreciated!

Member Avatar for Randomppl
0
71
Member Avatar for lobhater

I am a new c++ programmer that migrated from java. I'm glad i've finally found a "real" language.... Anyways... I have been trying to write a c++ program to send email using the smtp. I am not looking for code, i'm looking for a good resourse on the subject... I've …

Member Avatar for sidatra79
0
113
Member Avatar for rhoit

I create the simple template structure like this [CODE] #include <iostream> template <class info> struct box { info data; }; int main() { box<int> b1; b1.data = 1; std::cout<<b1.data; return 0;typedef box square; } [/CODE] Now i want to use the typedef for this template structure. I could not figure …

Member Avatar for rhoit
0
2K
Member Avatar for gregorynoob

okay, this is the problem (variation of the knapsack coins problem): you've got 4 coin types: 1 cent, 2 cents, 5 cents and a quarter...infinite amount of each. I'm supposed to find the number of ways in which the coins can be arranged to form the sum of some integer …

Member Avatar for VernonDozier
0
393
Member Avatar for dexter1984

Hi, I'm doing a project regarding converting roman numerals to decimals and vice versa. With some reference from the internet, I was able to come up with one. However, it isn't working very well. Can someone look at my codes and point out what/where's the mistakes? Thanks in advance. [CODE=cpp] …

Member Avatar for dexter1984
0
165
Member Avatar for alleycot

write a program to create a customer's bill for Ms.B's Desk-Shop. ms. B sell only three items: grater-cake, icy-mints and corn-sham, which she persoally delivers to ezch customer upon accepting their phone order. The unit prices are $50, $10 and $30 respectively, with delivery charge of 10% on the total …

Member Avatar for Ancient Dragon
1
266
Member Avatar for sandya_vish

Given the following student data (code, number, first name, last name, mark): CSC10208 1 Fred Nurks 50 ISY00245 4 Fred Bassett 75 Write a program to open a file, accept data in the above format using a struct, write the data to the file and then close the file. Your …

Member Avatar for skatamatic
0
93
Member Avatar for dmanw100

I am trying to use sprites, which I made in the form of bitmaps, in my program. Is there a library that will allow me to easily display them? I tried to use OpenGL but my computer will not allow it to initialize. I would simply like to display bitmaps …

Member Avatar for dmanw100
0
102
Member Avatar for defychaos

Hi :) I'm doing a programming project with development of an algorithm for a quadratic recursive sequence: (3, 3, 7, 11, 19, 20, 32), but I can't figure out which expression to use. I know it's probably got something to do with the differences of n-1 and n-2 being added …

Member Avatar for Lerner
0
343
Member Avatar for FAZ3

Can someone help me create a function in a linked list program that replaces an element in (I) place with an element a user enters? here is the sudo code I tried to implement but Im kinda lost. this is in my header file -> [icode]typedef int el_t; // el_t …

Member Avatar for stilllearning
0
104
Member Avatar for kurorokhristoff

Hi, im confuse making this program,.. i need a little help from expert here in dream in code so i decided to post it in here,.. Write a program that uses for statements to print the following patterns separately, one below the other. Use for loops to generate the patterns. …

Member Avatar for Lerner
0
2K
Member Avatar for Se7Olutionyg

[code=cplusplus] // grade.cpp // display the letter grade corresponding to an exam // score assuming a noormal scale # include <iostream>; using namespace std; void displayGrade (int score); int main () { int score; displayGrade(); cin.get(); return 0 ; } // get the data void displayGrade cout << " ENTER …

Member Avatar for sidatra79
0
104
Member Avatar for nkw0820

hello, I come from malaysia and i am doing a final year project in Evacuation Simulation programming i need to develop a WINDOW based simulation program which allow user to input data and show the result in Graphical method i have Background on C++ but i need use VB to …

Member Avatar for sidatra79
0
73
Member Avatar for ShadowOfBlood

I had to write a program that asks the user to guess a number. The program then tells if their guess is too high or too low depending on the difference between their guess and the random number. I finished the program and it works, but my teacher's very picky …

Member Avatar for Narue
0
183
Member Avatar for gopi17

hello....i'm juz wondering is there any that generates UML diagrams such as sequence diagram,activity diagram n more once i enter my source code??...help me pls most of the software i use only generates class diagrams... could anyone tell me which is can help me......

Member Avatar for sidatra79
0
111
Member Avatar for biggz

i started using c++ a few weeks ago , and i was told to build a program the finds the factorial of a number ... [code] #include <iostream> using namespace std; void main() { int x,fact; cout<<"Enter the number wanted"; cin>>x; for (fact=1; fact<=x ; fact++); { fact = fact …

Member Avatar for sidatra79
0
234
Member Avatar for VBNick

Hi, trying to simply plot a point when the user clicks my window, but the `WM_LBUTTONDOWN` even seems to be triggered no matter what input i give the program...letter keys, tab, pgup, spacebar, Everything! I don't understand what is going on =/ Im catching the even like this in the …

Member Avatar for VBNick
0
131
Member Avatar for abelingaw

A program where u have a 10 input number and enbles u to choose wether the output is in asecnding or descending order. Thanks in advance!!

Member Avatar for rati
0
173
Member Avatar for TheKebab

I don't know if this belongs in the programming section, but I'll ask anyway: I've been using VS2008 Pro since I got it for free through the MS Dreamspark student page. I've been using Dev C++ (Which many experienced programmers have given me harsh comments for) before I got it. …

Member Avatar for TheKebab
0
94
Member Avatar for unk45

alright..so i have to create an overloaded func where i replace O with E in str and replace world with jack in str and print from main using pointers to pass my strings to the func(needs to adhere to the mentioned)...need help ASAP ppllzz.. thnx [code] #include <iostream> using namespace …

Member Avatar for rati
0
126
Member Avatar for killdude69

I am trying to create a context menu that pops up when you right click a RichEdit. I know how to create the context menu, but I don't know how to check for when the user right-clicks RichEdit. This is what I have: [CODE=cpp] case WM_CREATE: { // Create RichEdit …

Member Avatar for killdude69
0
848
Member Avatar for gangsta1903

[code=C++] while(cin >> par1 >> par2 >> par3){ // get inputs cout << par1 << par2 << par3 << endl; [/code] I want to read three inputs with cin,as long as three inputs exist,the loop works good. But if the user enters two inputs,this time it waits for the next …

Member Avatar for gangsta1903
0
147
Member Avatar for Niner710

I am a little confused with class scope. Lets say that you have a class. [code] //file.h struct B { int BB; char CC; }; class A { public: struct B *getStructure(); private: int number; }; [/code] I dont understand what is the difference between putting struct B inside the …

Member Avatar for ArkM
0
124
Member Avatar for JackDurden
Member Avatar for Agni
0
277
Member Avatar for grisha83

Hello, Here is the problem ive been working on: write a while loop that displays each int from 1 to 5 together with its square and a cube. Display all three values for integer on a separate line. My problem is that it does not really do what it is …

Member Avatar for grisha83
0
265
Member Avatar for Tr1ckst3rNcag3d

First off, I have searched the forums and have not stumbled across the answer to my question. If I overlooked it feel free not to post here or close the thread or link me to the correct thread. I apologize if i missed it. I'm trying to create a number …

Member Avatar for Tr1ckst3rNcag3d
0
96
Member Avatar for demroth

I am trying to read the data (integers) from a file to a larger unsorted array and then move specific elements from that array to specific sub arrays. I can write the data from the file to the unsorted array fine but I get the wrong integers when trying to …

Member Avatar for demroth
0
92
Member Avatar for kevin7778

error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)

Member Avatar for stilllearning
0
64
Member Avatar for thenic

ok ive got my program to work now but cant get it to ask me if i want it to make a new calculation and i need to do this with a while command i dont what a done code out of you ppl cause its my homework and i …

Member Avatar for kenji
0
116
Member Avatar for kevin7778

[code=cplusplus] #include <iostream> using namespace std; int main(){ int n ,sum(1),k; cout <<"Please enter an integer n "<< endl; cin >> n >>endl; for(k=1;k<=n;k++) { sum +=(1/(1*(k+1))); } cout << "The sum = " << sum <<endl; return 0; } [/code] It does not recognize the input operator >> when …

Member Avatar for kevin7778
0
130
Member Avatar for unk45

why do i keep getting the same1?? [code] #include <iostream> #include <ctime> using namespace std; struct card { int value; char suit[10]; char faceCard[10]; }; int deal(card deck[maxcards], int decksize, int &z); void shuffle(card deck[], int decksize); int score =0; int main() { int scoretracker =0; card deck[52]={{11, "s", "ace"}, …

Member Avatar for chococrack
0
103
Member Avatar for CodyOebel

I am wondering if theres code for removing this software completely, but through code ? It has been a while since I have been working on this type of a project, but now that I am trying I noticed security centers such as norton, and mcafee have changed a bit …

Member Avatar for Th3_uN1Qu3
0
148
Member Avatar for t_s

I have been searching (google and books) for an answer to this question for a long time without managing to find any answer worth the name, so I'll try posting a thread hoping for better luck. Can someone explain to me why this: [code=C++] Aclass **tmp, *aclass[10]; tmp = aclass; …

Member Avatar for t_s
0
116
Member Avatar for goodmuyis

hello my dear am sorry to give this disturbance, i need a full cup of help am thirsty. i design a database application with c++ and access, when i test on my PC it work fine but on others PC it can find settings of ODBC what can do to …

Member Avatar for mcriscolo
0
82
Member Avatar for koushal.vv

Hi Friends, Can any tell me a free tool which detects memory leak in C++ code. to be more specific [ UNMANAGED C++ code ]. i am using some C Structs in my MFC SDI application, When i run in debug mode , the output window shows that memory has …

Member Avatar for Salem
0
158
Member Avatar for Melab

I'm looking for a very easy to use compiler that I don't have compile or download any other stuff for and on that is a GUI app.

Member Avatar for Narue
0
83
Member Avatar for sunveer

I want help in reversing a string without using another array. a string "Hello" should be printed as "olleh" Please help.

Member Avatar for Narue
0
169
Member Avatar for volscolts16

Hi everyone, I have a project that I have to do in C++. I have already done a very similar project in Java in another course. It's kind of amazing that the teacher that was teaching the java course got all of her materials from the C++ teacher. Anyways, my …

Member Avatar for volscolts16
0
106
Member Avatar for brezzler89

The code I have thus far is as follows: [code=cplusplus] /*-------Header (head.h)-----*/ #include <iostream> #include <cmath> #include <iomanip> #include <cstdio> #include <cstdlib> #include <ctime> using namespace std; #include "fcn.cpp" #include "Montecarlo.cpp" /*-------Main Source (prog.cpp)---*/ #include "head.h" int main (void) { Montecarlo(); system ("pause"); return 0; } /*-------Source file (Montecarlo.cpp)---*/ void …

Member Avatar for brezzler89
0
350
Member Avatar for Newguy89

the program should print 1 this one should have six spaces and then 1 22 5 spaces then 2 333 and so on 4444 sum reason when i post here it aligns left 55555 666666 though it prints... 1 22 333 4444 55555 666666 [code=cplusplus] #include <iostream> using namespace std; …

Member Avatar for Newguy89
1
109
Member Avatar for WongTinMing
Member Avatar for Salem
0
97
Member Avatar for nizbit

I am having a little bit of a dilemma. I have an input file that can have a number 1 through 9 or a asterisk. I am treating 1-9 as a character. I don't know if there is white space or new lines. I can't use >> because I don't …

Member Avatar for VernonDozier
0
122
Member Avatar for EnjozLearniz..

Hi mates I m new to C++ and I am trying to understand some code. ->Could one of u please explain me the three following lines of code: [code=c++] std::map<Pos3D,Object3D> Found3Dobjects; std::map<Pos3D,Object3D>::iterator Found3Dobjects_iter; typedef std::map<Pos3D,Object3D>::value_type Found3Dobjects_Pair; [/code] I read some tutorial for maps and got the idea. What I completely …

Member Avatar for jencas
1
86

The End.