49,766 Topics

Member Avatar for
Member Avatar for naji.awad1

Hey guys :) Can anyone show me a tutorial for game development in C++. Btw I'm on a mac so I can't go to the DirectX tutorial. Can you please avoid www.cprogramming.com because I dont like it. Thanx anyways :)

Member Avatar for stevecolin101
0
159
Member Avatar for mixelplik

I'm trying to run a binary sort that sorts through a list of randomly generated numbers, but for some reason isn't working. It will usually tell me if the highest or lowest numbers are in the array, but acts like a spaz on the middle ones. I keep fiddling with …

Member Avatar for vmanes
0
213
Member Avatar for amirali870

i want to write a program of 10 bank account users. then i want a help , how i write a program. in program i need a print or out put of 10 bank user like name,account no,branch no,account amount. if user press Yes then it gives the out put …

Member Avatar for vmanes
0
238
Member Avatar for pravej

Hi, Is there any way in C++ to select and read the last modified file from a unix directory? Let say the o/p of the ls -t is : abc.txt myfile.txt .... .... last_file.txt I want to select this last file ( can be of any name) and read the …

Member Avatar for iamthwee
0
6K
Member Avatar for bm42

Hi all, I would like to pose a design pattern to discussion that is achieved in two different ways. Imagine the situation where you have an interface "IFoo" (aka virtual) and implementations "FooA", "FooB", ... that inherit and implement "IFoo". Now you want the user (of the library you are …

Member Avatar for bm42
0
1K
Member Avatar for marc.orocay

can someone give me an example that draws right triangle using asterisk using do-while loop only (without using for loop)

Member Avatar for tinstaafl
-2
182
Member Avatar for Geowil

I am in the final stages of testing a text-based game I have been working on for several years but I am running into some major problems with my database access code and some very strange problems at that. What I am attempting to do is loop through a SQLite3 …

Member Avatar for Geowil
0
1K
Member Avatar for marc.orocay

can someone help me, I need a program like this but it **must not use for loop**. or can someone revise it using **do loop**? I need it badly #here is the code: { int n, i, j; do{ printf("Enter a positive int n: "); scanf("%d",&n); } while (n < …

Member Avatar for NathanOliver
-2
223
Member Avatar for christinetom

Hi everybody. Hope you are all well in the new year. I'm having trouble with joining two chars and displaying the output. For example Any clues as to how to do this? Thanks so much. #include <iostream> #include <string> using namespace std; int main(); { char a = 'x'; char …

Member Avatar for christinetom
0
464
Member Avatar for marc.orocay

Someone help me creating a this program. Well, I need a program that makes a triangle out of asterisk but it doesnt use "for" loop it only requires "do-while" loop. Actually I tried making one but it doesn't look like a triangle instead it jsut display a line of asterisk. …

Member Avatar for marc.orocay
-1
346
Member Avatar for nhrnjic6

void John_is_3D(int dimx,int dimy,int dimz) { int ***John; // pointer to pointer to pointer John = new int**[dimx]; // array of pointers to pointers for(int x = 0;x<dimx;x++) { John[x] = new int*[dimy]; for(int y = 0;y<dimy;dimz++) { John[x][y] = new int[dimz]; for(int z = 0;z<dimz;z++) { John[x][y][z]= x*y*z; cout …

Member Avatar for Ancient Dragon
0
183
Member Avatar for kiya ko

write a c++ program generat a fibonacci series using while loop statement .(Hint0,1,1,2,3,5,8,13,21,34,55,...)

Member Avatar for Banfa
0
197
Member Avatar for mayankjoin
Member Avatar for vipulsrivastava

Design and implement a class named "Vector 5D" using C++ which stores a 40 hypothetical vector having 5 components, you may assume these components as V[1], V[2], V[3], V[4] and V[5] . The class should use array to store these components. The class should have necessary constructors and member functions. …

Member Avatar for Lucaci Andrew
0
147
Member Avatar for gil.nickson

hi, can you help me with my code? actually its running but the total price of products bought is not displaying, can you help me with this one? :( #include<stdio.h> #include<string.h> #include<conio.h> int main(void) { int pno, choice, product, jf=12,d=10,l=107,c=2,cf=22,n=9,b=19,ap,a,total,disc,i,ctr,nSelection; char name[50]; char cname[50]; char y; char x; float price,qty,tax,dis,bill,dprice,ttotal; …

Member Avatar for noah_2
0
284
Member Avatar for pragati gupta
Member Avatar for deceptikon
0
86
Member Avatar for issamsaad

Write a program that allows accepting a positive integer number n and displaying n rows as the following form: Example: n =6 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5

Member Avatar for issamsaad
0
112
Member Avatar for CreatorZeus

chan someone help me see this problem? its closed and everything. string notename; x = 1; cout << notename[x] << endl; if(remove(notename[x].c_str()) != 0) { perror( "Error deleting file" ); } else { cout << "File successfully deleted"; }

Member Avatar for Ancient Dragon
0
334
Member Avatar for triumphost

I have the following code for 2D dimensional arrays being flattened as 1D C-style arrays: #include <iostream> int main() { int width = 4, height = 10; int arr[width * height]; for (int i = 0, k = 0; i < height; ++i) { for (int j = 0; j …

Member Avatar for Banfa
0
995
Member Avatar for rowen_1

I am trying out sqlite3 create statements and forign keys in c++ and I came up with 4 requirements. 1) a employer can create a job position 2) a employer can view the form reject or shortlist the applicant for interview 3) a applicant may apply for a job position …

0
160
Member Avatar for kamalashraf

please tell me whats wrong in this code, i am getting error, help me to fix this. Course *array[10][5]; Course *array2[10][5]; while(!coursefile.eof()) { for (int i=0;i<10;i++) { for (int j=0;j<5;j++) { coursefile >> array[i][j]->getBook(); coursefile >> array2[i][j]->getSection(); } } }

Member Avatar for Moschops
0
140
Member Avatar for kamalashraf

consider this class class Course { string book; char section; public: Course (string bk, char sec) : book(bk), section (sec){} string getBook(){return book;} char getSection (){return section;} void print() { cout <<"book name is: "<<book<<endl << "section is: " << section << endl; } }; i want to make array …

Member Avatar for Ancient Dragon
0
107
Member Avatar for kamalashraf

i have 10 students, each student is associated with 5 courses and the section of course, i want to do this in array, please help regarding this. thanks. for example john book1 A book2 A book3 C book4 D book5 B marry book1 C book2 B book3 A book4 B …

Member Avatar for deceptikon
0
101
Member Avatar for CreatorZeus

I'm having a simple i/o with file problem. I have the name coming from a string but it just wont open at all. Incoming code: string notename[] = {"NULL","empty"}; ifstream readnote; readnote.open(notename[x].c_str(),ios::in|ios::out); if(!readnote) { cout << "Read Error"; } its prolly something small but i keep getting the error, can …

Member Avatar for CreatorZeus
0
285
Member Avatar for thomas_14

I have a function changeUserPassword() in user.cpp and I wanted to do a cppUnit test on it. here are some possible unit test for changeUserPassword 1. changing a password several times. 2. changing password to the same password. 3. changing a non existing password. 4. Changing the password on one …

0
92
Member Avatar for bramsever

can any body write QT calculator GUI application - to QT command mode program (in batch mode ) we need to give inputs from command mode

Member Avatar for alan.fontenele.1
-1
119
Member Avatar for mayyy

I have to write a program that generate 7 random numbers from 1 to 39 to write condition which don't allows to repeat the same number twice , and to sort them from the smallest to the greatest in the end to have this result **** LOTO GAME 7 TO …

Member Avatar for Ancient Dragon
0
94
Member Avatar for Seba Sama

Hello, I came across a strange pointer (in my opinion): `void *(*foo)(int *);` Why are so many stars there? It was explained like: "...read inside-out; notice that the innermost element of the expression is *foo, and that otherwise it looks like a normal function declaration. *foo should refer to a …

Member Avatar for Seba Sama
0
224
Member Avatar for breezett93

Hi Everyone, For a couple weeks, I have been developing a pi approximation program and making little upgrades. Right now, the program asks for an input of iterations and then prints out the approximation. Now, I want to have every iteration printed out into an excel file with an approximation …

Member Avatar for duskoKoscica
0
233
Member Avatar for user4678

I have the code for the first part of a problem, which is to write a program that reads an angle x (in radians) from the keyboard. Then, in a function, compute the cosine of the angle using the first five terms of this series. Print the value computed along …

Member Avatar for duskoKoscica
0
6K

The End.