49,766 Topics

Member Avatar for
Member Avatar for MasterHacker110

I got into graphics programming a few days ago. I did some graphics before but very little in Ittlicht (a complete game engine with sound, rendering, network etc...) But I heard about DirectX and how great it is for games and other 2D and 3D graphics. But the API is …

Member Avatar for MasterHacker110
0
145
Member Avatar for furalise

Hi all. I've read allot about streams but I'm wondering if anyone can tell me why cin >> stringstream doesn't work? I'm getting there but my understanding has some floors in it. eg. stringstream Mystr; cin >> Mystr; Thanks so much.

Member Avatar for furalise
0
4K
Member Avatar for nathan.pavlovsky

Hello, as a project I am working on a player vs. computer game of Connect Four- where the computer has a lot of attitude. My code is below; the comments explain everything. ` // A Player vs. Computer Connect 4 game` #include <iostream> #include <vector> #include <string> #include <cstdlib> #include …

Member Avatar for nathan.pavlovsky
0
1K
Member Avatar for soche123

output should look like this * *** ***** ******* ********* ******* ***** *** * and seond one *************** *************** *************** *************** *************** Thank you guys in advance!

Member Avatar for sanjulovers
0
182
Member Avatar for HUSSEINI

phase(1) create a textual menu of the items in their prices phase(2) acivate your menu so that a user can select one item from the menu and display the selected item on the screen. phase(3) improve upon your program to allow user to order more than one item and the …

Member Avatar for sanjulovers
0
730
Member Avatar for MasterHacker110

I am primeraly a programmer in C++. Recently I started with DirectX11 in C++. The two problems I have is: 1) I get this error when I try to compile my code: 1>------ Build started: Project: t, Configuration: Debug Win32 ------ 1> t.cpp 1>t.obj : error LNK2019: unresolved external symbol …

Member Avatar for MasterHacker110
0
412
Member Avatar for eldiablo1121

Hello, I'm new to programming and I have to write a program for a retail store. The problem I'm having is when I repeat my loop, my "total" does not revert back to zero, so it will increment the previous total from the first loop iteration which essentially shows my …

Member Avatar for tinstaafl
0
399
Member Avatar for soche123

code is #include <iostream> #include <conio.h> using namespace std; int main() { int count=1; while (count++ <=5) cout<<count*(count-2)<<" "; cout<<endl; } WHat I don't get is how count becomes 3,8,15,24...thanks!

Member Avatar for RonalBertogi
0
213
Member Avatar for Elixir42

Hi, Please may I have your help on this one. The error is: 1>------ Build started: Project: DXTB 17, Configuration: Debug Win32 ------ 1> Main.cpp 1> _MyDebug Defined... 1> _Main Defined... 1> _CApplication Defined... 1> _CSpriteManager Defined... 1> _CSprite Defined... 1> __CStats Called... 1> _CStats Defined... 1> _CVector3F Defined... 1> …

Member Avatar for Elixir42
0
247
Member Avatar for JiLe

First of all sorry for my bad English. I had to use dictionary to write this message. I can't figure out how to write a programme for maintaince of a binary file in c++. It is supposed to contain a menu of functions - output (write down the binary file), …

Member Avatar for tinstaafl
0
358
Member Avatar for triumphost

template<typename T> void Transpose(T** Data, std::size_t Size) { for (int I = 0; I < Size; ++I) { for (int J = 0; J < I; ++J) { std::swap(Data[I][J], Data[J][I]); } } } int main() { int A[4][4] = { {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, …

Member Avatar for mike_2000_17
0
115
Member Avatar for kamalashraf

#include<iostream> #include<fstream> using namespace std; int main() { int n=0; int sum=0; ifstream fin; fin.open("input.txt"); for (int i=0; i<4; i++) { fin >> n; sum=sum+n; } cout << "Sum of given numbers is " << sum << endl; return 0; } in the above code, i want to fetch data …

Member Avatar for triumphost
0
605
Member Avatar for Chay Hawk

Ok so in my code im trying to beable to let the user enter the name of a list in main then pass the string to word_list function but my program just keeps saying file failed to open. If you spot any other problems please help me with them ive …

Member Avatar for tinstaafl
0
147
Member Avatar for e.patricioparga

I wanna build a program that allows you to send a mail and advices you when you have new mail. I know that for this I have to kee it running in the background. Would you recommend using C++ for such a purpose? (It's pretty much a mail client for …

Member Avatar for iamthwee
0
163
Member Avatar for isha.dakhara

i have got a c++ project to work on and the topic is shopping....i have to get something and neww added to it and the whole code is needed....

Member Avatar for rubberman
0
164
Member Avatar for justin.chestnutt

http://www.cs.ecu.edu/~rws/c3300/prog1.pdf (for anyone that wants to view exactly whats needed for turn in) Hello! I'm trying to write a c++ program that takes in the lower and upper limits of a bunch of numbers and output the length of the longest hailstone sequence. Posted below is what I have so …

Member Avatar for Fatma30
0
1K
Member Avatar for t2nator

I am making this program for a class and it works fine except for the daily interest rate for the checking account is off. The daily interest for the savings computes perfectly. The monthly interest rate for savings is 6% and for checking 3%. Account.h #ifndef ACCOUNT_H #define ACCOUNT_H #include …

Member Avatar for dexblack_1
0
172
Member Avatar for taogomano.wau

if there is a warning ***case bypasses initialization of a local variable*** in a C + + program, what is the solution to solve it? please help

Member Avatar for RonalBertogi
0
294
Member Avatar for mr.unknown

please explain this code to me ` main() { int u,i; for (u=1;u<=5;u++) { for (i=1;i<=u;i++) cout<<i<<"\t"; cout<<endl; } } OUTPUT: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 explain that how two loops are controlling this output someone explain it step by …

Member Avatar for sanjulovers
0
183
Member Avatar for daniel1977

Im having a problem with the following exercise. I have the whole program working, however, the transaction time is not passing to the customer. The only element that this affects is the time that the customer leaves. Anny assistance would be greatly appreciated. Best, Dani Below are the 5 files …

Member Avatar for dexblack_1
0
618
Member Avatar for iraklakis

Don't know why my code crashes when j=317. I thought was the matrix dimensions, so tried some numbers. Nothing particular happened. Every help would be very usefull. #include <stdio.h> #include <math.h> int main(){ int T,i,j,t,c,r[T],Jmax,Z,k; float v[10],R[10],EBNo[10],trapserv[10],a[10],w[10],Pblock[10]; float L[j+1][j],B[T+1][j+1],b[T+1][1000],P[T+1][j+1],q[j+1],qnorm[j+1]; float sigma,mtimi,mtimic,CV; float Nmax,g,W,EIother,C,Nown,No,totofcell,sumq; float Gamma,bita,QA,LA,BA; float x; //Data input// ` …

Member Avatar for iraklakis
0
234
Member Avatar for erogol

I have two structures as; struct collapsed { char **seq; int num; }; // set of collapsed examples struct data { collapsed *x; int num; int numblocks; int *blocksizes; float *regmult; float *learnmult; }; And I have one statically defined 'data X;' need to be transmitted into device memory from …

Member Avatar for Moschops
0
3K
Member Avatar for Ram J

I need a C++ program which receives two numbers from input (n, x) and calculates the following equation for entered numbers (n, x). 1 + x/1! + x2/2! + · · · + xn/n!

Member Avatar for sanjulovers
0
204
Member Avatar for pearl doll
Member Avatar for daino

I'm trying to use std::ofstream to create a file but I'm getting an error. I'm using a string variable instead of a string. example below. std::ofstream Myfile("C:\\testfile.html"); // This works fine //but the below doesn't string mystring = "C:\\testfile.html"; std::ofstream Myfile(mystring); //doesn't work. Not sure why. Any clues?

Member Avatar for Moschops
0
490
Member Avatar for sanyam.mishra

In my program I need to execute two loops at same time. How can I do that? As windows have multi processing can I too complete two or more processes at same time? Actually I need 3 different timers which will be running simultaneously.

Member Avatar for mike_2000_17
0
576
Member Avatar for 9tontruck

Hi.. d1 = a1*x1 + b1*x2 + c1*x3 d2 = a2*x1 + b2*x2 + c2*x3 d3 = a3*x1 + b3*x2 + c3*x3 Knowing all of a,b,c,d, I have to find x1, x2, x3. As you might noticed, this is high school math. But, how do I write the code to …

Member Avatar for DavidB
0
413
Member Avatar for DarrelMan

Making a command line interpreter for my Operating systems class The following line is giving me a problem if (strcmp(argv[0], "ren") == 0) { return RENAME; } For whatever reason it does not return anything. However if I change "ren" to "darrel" it returns the proper value of RENAME and …

Member Avatar for DarrelMan
0
194
Member Avatar for lemongardens

hi ı have an exam can you give some examples about win32 especially main part of programme thnks

Member Avatar for Ancient Dragon
0
134
Member Avatar for GregXaiver

Good Morning, My name is Greg and I am trying to teach myself to write code. But I have a question I wrote a program that compares a range of numbers and tells you the grade. The program works and dose what it is supposed to do but I have …

Member Avatar for GregXaiver
0
167

The End.