49,761 Topics
| |
i am writing a program with threads. it's a simple program in which user will enter how many number of thread he want to be created. what technique we use to create multiple threads ?? using for loop ??? suppose to run 3 threads... [code=c++] for(c=0; c<3; c++ ){ pthread_create(&thread[c], … | |
Design an Employee Information System for employees of Super Shoppy The employee master should keep employee specific information. For each employee, details of all dependent family members are also maintained. There may be one or more family members for an employee. The menu base program should provide following options… … | |
Hi there, I have been trying to figure out the common recursion problem given in e.g. 6.42 in the following link: [URL="http://net.pku.edu.cn/~course/cs101/resource/CppHowToProgram/5e/html/ch06lev1sec28.html"]Towers of Hanoi[/URL]. After a few hours I still can't figure it out, even though I've got the code: [CODE=cplusplus]#include <iostream> using namespace std; // num disks void Towers(int … | |
I was trying to find the number of zeroes in a factorial of a number. The time limit was 2 sec. Max number of test cases being 100000 my code is as follows [code=cpp] #include<iostream> #include<cstdio> int five(int number); int two(int number); using namespace std; main() { int num; int … | |
Hi there, Ive just started out learning C++ and ive been thrown 3 qns and ive got no clue how to start working on them.Im not here for the codes but rather someone could spur me up so that i can kickstart. First of all, i need someone to recommend … | |
Does anyone know a source code for calculating Zodiac Sign using a given DoB Thanks | |
guyz, im having problem programming with UNO. when i include the header, such as [code]#include <com/sun/star/bridge/XUnoUrlResolver.hpp>[/code] i get "no such file or directory" im new to this. Is there any things i must set first? ive already run the setsdkenv_unix.sh. Oh ya, im using openSuse. So any advice on what … | |
I'm not quite familiar with Visual C++. I was trying to create a basic win32 program. I compiled it but i don't know how to run the output file. If i select start without debugging, it asks me to choose the executable file. But i don't know what to do … | |
I am having trouble figuring out how to write the following code and having the the two void functions? I am supposed to pass the values of the integer array to the functions using the call by reference method. here is the code i have so far. [code=cplusplus] include <iostream> … | |
option_3(): >>cin >> studentID[actualNum]; is actually working though :S I've tested it and it works fine. The code marked in red is supposed to be just an average, but the thing is I have no idea how to sum (add) the studentMark then display the total of all students' marks. … | |
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) … | |
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) … | |
Hi there, This is my first post and I am quite new to developing games. I have only made tic tac toe and currently making a pong clone, using c++ and SDL. I seem to be having a problem with the animation of my ball (or puk as I call … | |
output should like that: input #: (909)869-2511 area code: (909) exchange: 869 ext.: 2511 telephone #: (909)869-2511 this is my code so far: [code=cplusplus] #include "stdafx.h" #include <iostream> #include <iomanip> #include <cstring> using std::strtok; using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char sentence[32]; char *tokenPtr; tokenPtr = &sentence; … | |
Hello! google has turned me up at this forum so many times i think it would be stupid to ignore the hints & not get registered! Im having some problems with objects. Here is my code: [CODE]#include <iostream> #include <string> using namespace std; class planet{ public: int moons; int mass; … | |
HI, I need some quidance how to practice vc++ to attend some interview. What are the main topics I have to cover. Thanks Motiranjan <snip email> | |
hey all, i'm working on a very simplistic example to revive my cpp skills for an up coming work placement. however i'm running into what seems an inconsistant error using ostream (cout)... have a look at the following code in the main()... :: main.cpp :: [code=CPLUSPLUS] #include <iostream> #include "IntArray.h" … | |
Hey, I really need some help fixing the errors in this source file! I honestly don't know how to fix some of the errors. This assignment has to be submitted it 2 days. I've looked for the missing sytax errors and the other ones but i just cant seem to … | |
Hi How to control the CPU usage of particular process in linux. | |
Hello, I just started reading and learning DirectX SDK's tutorials in order to develop skills for game programming. I don't know COM very well (i just start learning it). I read lights, materials, mesh and BasicHLSL DirectX9 tutorials (line by line). I know C++ and math (not VERY good math … | |
Is it possible to open a file in binary mode and make an array out of it then to encrypt that information. I guess I should ask how you would start something like that? Thanks | |
Hi, I'm currently trying to create a linked list to use with a BSP Tree, however the root node keeps on losing its' values as soon as I leave the function. The code is quite extensive, so I'll try to post the relevant sections. This is the header file. [b]OpenGLView.h[/b] … | |
[code=cpp]#include <iostream> using namespace std; int Main() { int i = k + 1; cout <<i ++ << << endl; int i = 1; cout << i++ << << end1; return 0; } [/code] Please help me? What is wrong with this code? I am a C++ Noob! I just … | |
I'm having a bit of trouble with this one, the goal of this program is to enter in 1 to 5 numbers, with a maximum of 5, into a vector and then popping as many numbers as the user wants until the vector contains nothing. My problem is that I … | |
Okay i am apparently having problems on understanding exactly how string works. The problem im having is I get an error at the part where it assigns the cards. Please help me! Much appreciated! [code] #include "stdafx.h" #include <string> #include <time.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { … | |
[code=cpp]#include <iostream> using namespace std; int main() { int length; length = 7; cout << "The length is " << length; return 0; } [/code] When i run the program, it outputs everything but the screen comes on real fast and then closes and i cant get it to stay … | |
Hi, why doesn't this code work: [CODE]int main() { cout << "Hi!\n"; #ifdef DEBUG cout << "I'm in debug mode!\n"; #endif return 0; }[/CODE] I am trying to make the message "I'm in debug mode!" only print when I am in debug mode for my IDE (Visual C++). But also, … | |
I have a C++ program that uses udp to send data to a VB 6 program that is running on the same computer. The VB program requests data from the C++ program. It works but occasionally the VB program throws an error. The error is: "The connection has been reset … | |
Hi, why isn't this code is copying the file a.txt correctly? [CODE]int main() { ifstream input("C://Users//Me//Desktop//a.txt"); input.seekg (0, ios::end); int length = input.tellg(); input.seekg (0, ios::beg); while(true) { char* buffer = new char[length]; input.read(buffer, length); ofstream output("C://Users//Me//Desktop//b.txt"); output.write(buffer, length); break; } return 0; }[/CODE] I attached a.txt and b.txt in … |
The End.