49,757 Topics

Member Avatar for
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
101
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
96
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
96
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
68
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
110
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
369
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
162
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
264
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
90
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
96
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
340
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
101
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
103
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
72
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
180
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
109
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
231
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
130
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
170
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
91
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
124
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
836
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
146
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
119
Member Avatar for JackDurden
Member Avatar for Agni
0
275
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
263
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
93
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
90

The End.