49,761 Topics
| |
#include<iostream> // this will allow me to display an output and allow the player to give input into my game #include<string> #include<sstream> using namespace std; char slot[6][7]; // this will let my game store what is inside each slot of the board // the board is a 7 x 6 … | |
I have a large amount of code, so I have tried to only include the relevant parts of the code here I have a header file called "ASp.h" namespace ASP { class ASp { public: ASp(); ASp(FILE* fp); void T_B_P_N(const char* type, int num); } } another header file "ms.h" … | |
I need to write a program like this Sample output: Please enter a number(Less than 8 digits): 1203021 There are 2 zero (0) in this number I dont know how to write a formula to count the 0 inside number please teach me. | |
I m student of BSCS and i m learning Allegro library for c++ my self and i want to create a 2D-game but there are few problems are occur so can any body help me. | |
Hi, I am a newby and am surprised I made it this far. My program is a TicTacToe program. I am having troubles with checking the validity of each move. I have tried multiple things, but could not figure it out. If someone could help point me in the right … | |
This is what I have so far :/ #include <iostream> using namespace std; int main() { int i; for (i = 1; i <= 12; i++) { cout << i; if ((i = 4) && (i = 9)){ cout << " \n"; } else { cout << endl; } } … | |
Hello everyone , i'm a new member here , looking forward to learn C++ . | |
Title : Monument Budi wants to build a monument on the land of size N x M (3 <= N, M <= 500) plots the square. Monument to be built has a square base that is rotated 45 degrees and the monument occupies a plot located in the middle of … | |
Am looking for a little bit of help to convert the following Visual C++ code into a delphi if its possible #define MARGINX 24 // this much for "mon" #define MARGINY 24 // this much for "00" char *dayNames[7] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" }; #define … | |
#include "HTC_header.h" void initialization_h(struct particle *particle,struct machine *machine) { int i,t; double rnd; for (i=0;i<mh;i++) { for (t=0;t<tym;t++) { rnd=((double) rand() / RAND_MAX); particle->qh[t][i]= machine->qmin[i]+(rnd*(machine->qmax[i]- machine->qmin[i])); } } } // end of func | |
Dear all, If i have a vector inside a vector creating a matrix, how do I delete a specific column in that matrix. I have already populated the 2d vector now i need a method to delete a specific column in that vector, for example my vector would look like: … | |
Hey, I know how to read from file.. I would to save it and send it to another function that can print it out that is in a different c file .. how can i do that? | |
#include <cstdlib> #include <iostream> #include <string.h> #include <cstdlib> using namespace std; int main(int argc, char *argv[]) { int airp[13][6], row[2]; string t; char airc[13][6], s; for(int i = 0; i < 13; ++i) { for (int z = 0; z < 6 ;++z) { airc[i][z] = '*'; airp[i][z] = 0; … | |
Is there are an easier way of serializing a vector attribute of an object in c++ using sqlite3? | |
Input a string and check whether a particular character is present in it | |
Here is what I have so far: #include <iostream> using namespace std; int main() { int i; for (i = 1; i <= 12; i++) { cout << i << endl; } if (i = 4) cout << "My lovely month in which I've been born! \n"; system("pause"); return 0; … | |
i am interesting in choosing .net development field, so what tools/sofware,tutorial should i have after having some grip on c++. very thanks Tech_learner | |
I can't get it to compile. I've tried so many things. The errors |29|error: expected unqualified-id before '{' token| |266|error: expected '}' at end of input| |266|error: expected unqualified-id at end of input| ||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| Here is the code` #include … | |
Hello, I have a code I'm working on that is supposed to keep track of airline tracks. You need to know the airline name, the flight number, and the date and time of a set of flights. Once you have a set of flights, you would like to be able … | |
How to run this souce code.... I don't know if how I will have to revise. visual studio 2010\projects\binarysearchtree\binarysearchtree\binarytree.h(7): error C2143: 구문 오류 : ';'이(가) '<' 앞에 없습니다. visual studio 2010\projects\binarysearchtree\binarysearchtree\binarytree.h(7): error C2059: 구문 오류 : '<' visual studio 2010\projects\binarysearchtree\binarysearchtree\binarytree.h(8): error C2143: 구문 오류 : ';'이(가) '{' 앞에 없습니다. #ifndef … | |
I'm trying to read a message (string/text) from the server, and I set the buffer size really large (buffer_size = 1000) so that I only need to read once from the server. So my question is if the message is exactly 10 bytes, and I call read(socket, buffer, buffer_size), then … | |
write a program that create an array with size provided by the user,let the user enter the value, after the data has been entered,have your program output the values with index number. | |
Write a C++ program that reads characters from a text file. The program changes each letter by the next letter in the Alphabet. For example, the lower-case letter ‘a’ is changed ‘b’; ‘b’to ‘c’; ……. , and ‘z’ to ‘a’. Similarly, for upper-case letters, ‘A’ is changed to ‘B’, ‘B’ … | |
Hello to all, I have a console executable file that I run from DOS console passing some options and an input file. I'd like to give to this exe file a GUI. I'd like that the GUI was a new exe file that could contain inside my console exe file … | |
Hi, I have run into an obstacle while trying to restart a direct sound device on windows 7. What I'm doing is clasical stuff: 1. Create the interface `DirectSoundCaptureCreate8(CConfig::GetMainSoundDeviceCaptureGUID(), &m_radioRecordObj, NULL);` 2. Create the buffer `m_radioRecordObj->CreateCaptureBuffer(&m_radioRecordDesc, &pDsb, NULL);` ... `pDsb->QueryInterface(IID_IDirectSoundCaptureBuffer8, (LPVOID*) &m_radioRecordBuf);` 3. Start the buffer `m_radioRecordBuf->Start(DSCBSTART_LOOPING);` after some time … | |
Living in the wilderness of the most remote sub-saharan Africa, i am however though determined to study C++ Programming | |
http://pastesrc.com/view/JbIfLyTVbu I've been looking over the Web, but cannot seem to get it to work... | |
I have been asked to design an API that allows the user to do this and do that in c++.. What exactly is an API. In c++ is an API a .header file? Are the methods in class header file the API to allow user to interact with our .cpp … |
The End.