49,761 Topics
| |
I am working thru the Wrox book: [U]Beginning Programming[/U], and need some advice on getting a simple program to compile. I have Vista and use the free Borland C++ compiler. After entering in a simple C++ code, I was not able to get it to compile. When I attempted to … | |
hi everyone this is my first post and yes, im just starting with cpp im using devc++ so i have this homework which i could get done for its due date but still it would really help me to understand more about cpp if i could get it done but … | |
can anyone explain this code to me ? This code can set font color in c++ (window only) and i copy from this web site ([url]http://www.dreamincode.net/code/snippet1491.htm[/url]) it work , but i don't understand some line [B](<-)[/B] 1.void setcolor(unsigned int color) 2.{ 3. if (color >15 || color <=0) 4. { … | |
I have to make a Tic Tac Toe game for class and I have a problem with checking if the space is available when the player enters it. Everything else works fine. Here is my main: [CODE]#include<iostream> #include"tictactoe.h" using namespace std; int choice; int main(){ TicTacToe myBoard = TicTacToe(); cout<<"Enter … | |
does anyone happen to know of any sites with advanced typedef's such as functions...pointeres....etc? i've seen them used and would like to know more about how to use them -thx | |
We have to write a program that prompts a user to input an integer and after that i get lost i attached the problem to this thread and help would be greatly appreciated!! | |
Hello Everyone, I need to add functionality to store the guesses the user makes in an array up to a maximun number of guesses stored in a constant. It must display a list of the previous guesses before the user guesses a number each time (excluding their first guess). Once … | |
Hello everyone, Well im currently going through OpenScenGraph. i could not understand this piece of code: [CODE]class OSG_EXPORT Group : public Node { public : Group(); /** Copy constructor using CopyOp to manage deep vs shallow copy. */ Group(const Group&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(osg, Group); ... // code coninues };[/CODE] Now, … | |
Greetings friends: I have the following question: It looks like to use the "listcont.sort()" function of the list container I will obviously need to overload comparison operators. it uses the "<" operator. Will I need to overload any other operators for this to compile and run successfully? I am planning … | |
Hello, How can I do this: Implement the MergeSort algorithm in C++, Generate random numbers into a text file to read as input. The 2 parameters to the program are the input and output text files Thanks | |
Okay i have tried everything please can someone help me i am trying to restart this program so i have used a do while loop. The problem is that when i say n to terminating it just asks the question again do i wish to terminate every time i click … | |
When i insert value into table row (data type float), smt rounds decimal values into zeros. Here is the dramatically simplified code in order to see the situation.Interestingly, assigning a single array value into a variable (as usual) doesn't work here ! Is this a SQLite bug ?? | |
i am a c programmer, 6 month old for c++. i am trying to add some feature to a huge c++ base code !. stuck at this funtion . ( function names/varibles names modified ) void MCE::AddM( int Cid, int Tid, int Rid) { TrInstEntry* pTrInstanceEntry = (TrInstanceEntry*)m_MappingList->find(Tid); if ( … | |
[CODE] char *CHuser, *CHpass; CHuser = user_user.GetBuffer(0); //user_user its CString verb CHpass = password_user.GetBuffer(0); // password_user its CString verb [/CODE] i need to convert the CString to char but is not woking if someone can help me its gon be very useful ks biny | |
I read something online about being able to make my patch run as an administrator by default by using XML code? How would i put this into my program? This patcher is going to be put into a larger source code of a client, and will just be called by … | |
[QUOTE]I cant figure out what should i do so that in case one, if i choose to continue buying, not to start from the begining, but just to do the remaining calculations. also if it is possible to help me with a function outside main so that i calculate the … | |
Hi everyone I've been looking into boost and c++ reference, as well as some googling, and I cannot find a way to get a thread's execution time, all options I found are related to system time and I need only the execution time for the thread (inside the thread's context). … | |
Hi! In my direct 2d game i want to draw a big background picture entered by the user. Im currently trying to do this as described on [url]http://msdn.microsoft.com/en-us/library/ee719658%28v=vs.85%29.aspx[/url] . Altough it gives me read error at pos 0x0000. Heres the code: [CODE] RECT rc; GetClientRect(hWnd, &rc); using namespace D2D1; //Render … | |
Hi, I've been trying to compile the following code in visual c++ 2010 Express Edition. But the output window just says: 1>------ Build started: Project: Ans7, Configuration: Debug Win32 ------ ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Code Follows: [CODE]/*Program to dynamically allocate a 2D array*/ … | |
Hello everybody, I wrote a test source code about 2 classes point and circle. These classes illustrate the center of a circle (point class) and its radius (circle class). Circle class inherits point class. Here's the code: [CODE]#include <iostream> using namespace std; class point { private: int x, y; public: … | |
Hey everyone, We're trying to figure out if it's possible to use winsock on an AIX system? If not, is there any native support in C++ for unix based machines and e-mail support, without importing 3rd party libraries? | |
Hello Daniweb, I'm obviously very new to the programming world. I'm trying to make the popular Guessing random numbers game. The things I'm having a hard time with is getting the input validation to work. When characters are input instead of numbers, the program goes into an infinite loop. I'm … | |
Hello Is this safe? In a API I am using have a protected inheritance of a class [CODE] class B { public : method(); } class C : protected Class B { }[/CODE] I need to access those pulbic methods in Class B So is this ok and safe? [CODE]C* … | |
I am just having trouble with the beginning stages here. I am just very confused on different syntax terms. I have a book here "Microsoft Visual C++.net" with all the installation and whatnot with it. It doesnt use the normal cin and cout but used Console::WriteLine and what not. Is … | |
| |
I am using libhash++'s getHashFromFile() as seen in [url=http://hashlib2plus.sourceforge.net/example.html]this[/url] example to get the hash from files. When the file is a simple text file I get the same result as I get with md5_file() in PHP and the program [url=http://www.pc-tools.net/win32/md5sums/]md5sums[/url], but when it is a binary file I don't get … | |
I have a question. I worte frontend application to manage Active Directory. It uses AD commands like "dsquery,dsget etc" I use them this way: system ("dsquery *"); What i need to do is to write a code that will capture all text viewed by commands in system("") or to capture … | |
Morse code Converter Morse code is a code where each letter of the English alphabet, each digit and various punctuation characters are represented by a series of dots and dashes. Write a program that asks the user to enter the string: “Yesterday, I slept most of the night. I saw … | |
[CODE]#include <iostream> #include <conio.h> using namespace std; int main() { int num[5],high=0,high_num=0,low=0,low_num=0,a=0; for (int a=0;a<5;a++) { cout<<"enter number "<<a+1<<":"; cin>>num[a]; } for (a=0;a<5;a++) if(num[a]<high) { high=num[a]; high_num=a; } cout<<"highest number is.."<<high_num<<"\n"; cout<<"highest number is.."<<high; getch(); return 0; }[/CODE] please CORRECT this Code the problem is.. "PROGRAM THAT CAN ACCEPT 5 … | |
Hi, i'm a new learner of the ways of COM and, when trying to recode a code example found in [I]Automating Office[/I] by Lori Turner from just a demo of Word interaction into a c++ class (which i will be using in my program) i come across these linker errors: … |
The End.