49,761 Topics
| |
SinglyList.h [CODE] #ifndef SINGLYLIST_H #define SINGLYLIST_H #include <iostream> #include <string> using namespace std; class Exception { private: string errMsg; public: Exception(const string& err) { errMsg = err; } }; class InvalidPositionException : public Exception { public: InvalidPositionException(const string& err) : Exception(err){} }; class EmptyException : public Exception { public: EmptyException(const … | |
Hello, I had quite a few bugs with this program and it's fore-bearer. I got all but one of them fixed and it's in one of my if-else loops. When the program runs it runs good and then when it gets to the loop it only pulls out the first … | |
sometimes when I run my program the exe window just appears for a sec and disappears.Is there any particular cause for this? One of those programs is written here. #include<iostream> #include<string> using namespace std; int main() { int i; string s; for(i=0; ;i++) {s[i]=i;} int n=s.length(); cout<<s[n]<<endl; system("pause"); return 0; … | |
how to create a password program in c++ .. please give me some code .. thanks | |
Hello. i searched for the term relocatable code and this is what i found. Definition:[I][B]A code generated by an assembler or compiler, and in which all memory references needing relocation are either specially marked or relative to the current program-counter reading. [/B][/I] Can anyone please elaborate a little more and … | |
can anyone explain how 2 processes communicate with each other using MPI send and receive and what to do if i have more than 2 processes Thank You, chin | |
I am trying to implement a map for a aerial combat game, that could be reused for AI portions as well...... but I am a bit confused about the map representation of a 3D scene..... Should I use simple node styled graph? Or a navigation map, though I don't see … | |
Hi guys, i need to make the Game of life in C++. I get a run time error when i run this program, it compiles fine. This is the .cpp file in the project. Dont know if you need the driver or header to spot my mistake. [CODE]#include <iostream> #include … | |
hi how can i create a port tunneling in a c++ application? assume that application has client version that sits on my clients OS(which is Windows platform) and collect their network traffic,and redirect it to my server? | |
If you are reading this post thanks for your help, I really do appreciate your help... Now on to my question I am trying to write a program that reads and echoes integers until the difference between two successive integers is greater than, or equal to, 10. [I'll need the … | |
Hi guys, I am trying to program some sample tasks with pointers. Below is the step by step instructions that I have to follow. I am having trouble at step 10 which is to swap the values of 2 variables using pointers. please help, I have tried almost anything out … | |
In a scenario that caller doesn't necessarily need callee to use memory of one of its local variables of a primitive type to track that variable later for anything, I know that when passing that variable to a callee function; it'd be done by value and that makes total sense … | |
I am attempting to make a class called Profile and have numerous profiles in an array (70 to be exact). [CODE]//profile.h Class Profile { int _age; string _fname; string _lname; int _height; char _gender; Profile(int val, char gender) : _age(val), _gender(gender) { } int getHeight(); int getAge(); }; [/CODE] [CODE]//profile.cpp … | |
Hi, this is my first post and I need your help, I need examples of how to use methods in c, that are simple, for example do any math operation with the variables that are part of the class. And, if you can, compare the method of the class with … | |
I have looked around and it seems that there are no comprehensive tutorials on integrating LUA into a C++ application. What exact files must i have/include/link etc? Most tutorials don't describe this in any detail and i am left wondering what i need where. | |
//Write a C++ program to determine and print the sum of the series ( 1/6 + 1/10 + 1/14 + … + 1/(2*(2*n+1)) )for a given value of n. The value of n should be given interactively through the terminal. (Note: You will only get credit if you use a … | |
private: char board[3][3]; // two dimensional array stores current board configuration }; tictactoeGame::tictactoeGame { // set boardConfig[i][j] to be ' ' (the space character) for each i,j from 0 to 2 } | |
Basic thing which I am currently unable to do with code in Windows Forms: I want to remove a background image from a panel/picture box. How do I set the BackgroundImage to nothing or remove the background in some other way? E.G Early in the code the background is added: … | |
How to implement following C++ program into Java using the file system.. Please help me. please send the java code on <EMAIL SNUPPED> thanking you. [CODE] /*Header Files*/ #include <stdio.h> #include <conio.h> #include "bcio2.h" #include <math.h> #include <stdlib.h> #include <string.h> #include <time.h> /*Function Prototype*/ void sleep(void); void sleep( int nbr_seconds … | |
QB64 is a programming language written in c/c++, it is fully compatible with QB 4.5 but with extended modern features and now we would like Galleon (the developer of QB64) to add the ability to call external libraries (dll files). However, Galleon is busy with the compatibility issues with QB … | |
[CODE]#include <iostream> #include <fstream> #include <cstdlib> #include <conio.h> #include <iomanip> #include <ctype.h> #include <windows.h> #include <cstring> #include <ctime> using namespace std; int main() { ofstream outputparticulars("particulars.txt",ios::out); int d,a,b,c; char ic[100],password[100],confirmpassword[100]; char info[6][101]; cin>>d; if(d==1) {cout<<"1"<<endl; } else if(d==3) { cout<<" Key in your......\n"; cout<<" First Name : "; cin.getline(info[0],100); outputparticulars<<" … | |
Im trying to learn working with text files and I been able to make a program adding text to a text file. However I have no clue how to make it so I'm able to add numbers to the text file. I want the program first ask for the name … | |
Hi I have an array which contains a number and string in each element - itemClass.itemID and itemClass.itemName. the two combined making up an inventory I am trying to build a function which uses a for loop to take each itemID and concatenate them all together to produce a string … | |
Hi. I have one silly problem. I'm trying to read from file with [iCODE]ReadFile.read(ReadBuff, 1);[/iCODE] char by char and i need to convert them to ascii code. With normal ascii symbols it's all right. But them i'm trying to convert extended ascii symobl to ascii code it gives me negative … | |
I have to turn in a project in my beginer C++ class in two days time and I am totally stuck. The project is to promt a user for an integer (between 1>=num<1000); Tell if that number is a prime number ( if not find a way to show the … | |
i am trying to implement an AI part for the FPS type of game ...heard it is called Aerial Combat game...... my basic idea for the AI portion is that I an going to have two Finite State Machines running simultaneously, one for locomotion or movement decision and another for … | |
Hi, I'm using vc++ 6.0. I used the Date Time Picker Control in the dialog to get Date of birth from the user. Now i want to capture the date of birth and write it to a file. I created a variable for IDC_DATETIMEPICKER as COleDateTime with name m_DateOfBirth using … | |
Hello I cannot figure out by myself these errors: error C2143: syntax error : missing ';' before 'using' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int I surfed the web but I'm still stuck; I believe my problem it's with the Windows Headers. I … | |
Hello I have create my program with mfc. there is text box containing default value 0. if we remove 0 from edit box, it generates error message, "Enter a Number." Can anyone tell me how can i remove this default message box from my program? I am too much frustrated … | |
this is the problem Write a complete C program that can be used as a simple line-oriented t-xt editor. This program must have the following capabilities: (a) Enter several lines of text and store in a data file. (b) List the data file. (c) Retrieve and display a particular line. … |
The End.