49,760 Topics
| |
Hello everyone! I am currently working on creating a Poker Simulation using the language C++. However, I am having issues with my swap function and also creating the conditions, such as declaring a Flush or Pair. Here is the code I have so far, and if you can assist me … | |
Hello people, I've got a 2-d array, the first row has a string in each position, the second has a number in each position returned by a function that run on the strings.I run the mutatedstring function, run the matchmutated and put the values into the array, offspring times. Then … | |
Hey all, I'm trying to make a DLL that can be used in Pascal to enable multi-threading. I've decided I want to export Threads in C++ to a DLL. Before I make DLL's I usually write the program first to test everything then I convert it to a DLL. [CODE] … | |
[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); int A[20][2],n,sum; cout<<"\n\tEnter the no. of terms: "; cin>>n; cout<<"\n\tEnter "<<2*n<<" numbers to the "<<n<<"*2 array: "; for(int i=0;i<2;i++) { for(int j=0;j<n;j++) cin>>A[i][j]; } cout<<"\n\n\tThe Array you entered is: "; for(i=0;i<2;i++) { cout<<"\n"; { for(int j=0;j<n;j++) cout<<A[i][j]<<" "; } } for(i=0;i<2;i++) { sum=0; for(int … | |
Hi, Is it possible to take the input from a textbox that's in chinese (unicode) and convert it into hex to output to a text file? Any insight would be great, thanks! | |
Hey guys, I am trying to learn single linked lists and at first I was having some trouble but now my code works perfectly. At first my program would crash, and when I tried to debug it, it would always crash where ever I had a 'delete' operator within the … | |
Please i want to end a program in a function outside function main. also want to end executing a function of type void without allowing it to end but don't know how. please help me out. | |
I'm trying to get some developer tools for my Macintosh Mini running on Power PC. It's OS is Mac OS X Leopard. I've tried getting Xcode but I can't find any downloads for it that don't require the developer programs at Apple's website. If anyone has any ideas or any … | |
hi all i am trying to make a pause in a 2d game on C++ im going to use a message box with answers yes and no..yes to continue and no for main menue. how do i make unsighned short w = the answer to textbox? ps i tried using … | |
Good day. Every time i launch the eclipse ide, i get the missing VC++ 2008 runtime redistributable package is not found but i have the runtime installed on my system. i have the visual studio 2008 and 2010 ide installed on my system. Anyway to get eclipse to find this … | |
[CODE]#include "Sorts.h" Sorts::Sorts(void) { } Sorts::~Sorts(void) { } void Sorts::insert() { ofstream myfile; myfile.open ("InsertSorted.txt"); starttime=(long)time(NULL); int A[ELEMENTS]={5,2,4,6,1,3}; insertsort(A,ELEMENTS); cout<<endl<<"Sorted list "<<endl; for(x=0;x<ELEMENTS;x++) { cout<<A[x]; } endtime=(long)time(NULL); totalseconds=endtime-starttime; minutes=totalseconds/60; seconds=totalseconds%60; cout<<"\nStart time: "<<starttime; cout<<"\nEnd Time: "<<endtime; cout<<"\nElapsed Time: "<<minutes<<" min, "<<seconds<<" seconds"<<endl;"\n\n"; } void Sorts::insertsort(int A[],int length) { for(int j=1;j<length;j++) … | |
guys I've been trying to write this lab for my comp sci class for three days now. i've got to the point where it compiles but when I try to run it a table pops up that's says there's an error somewhere in the program that causes it to abort. … | |
Hi, I used C# and VS2010 for doing my projects. Some how, now I should write a program in C++ with database and GUI. The program's language is Persian, So Button's text and data in database should be in Persian. Please Guide me in this case. how to use Unicode … | |
[CODE]#include <iostream> #include <ctime> #include <cstdlib> #include <string> using namespace std; int getCardPoints(int value, int & aceValue) { if ((value >= 2) && (value <= 10)) { return (value); } else if (value == 1) { aceValue = 10; // 11 -1 return 1; // Already contain 1 for the … | |
Hello I already posted this on [URL="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=306688"]opengl.org[/URL], but nobody seems to have a solution. Basically I set up Opengl and when I want to draw 3D or say I want to use the z-axis by translating in this dimension, it doesn't have any effect. What I can do, is moving … | |
Hi! I am writing programm that will determine what number is drawn in bmp image (there is only one digit number in image). So, I am trying realize it the following way: 1. read image pixel by pixel 2. create a two dimentional array of pixel values 3. if color … | |
Hi everyone, I just finished to implement my first "serious" C++ program on my laptop. When I compile it (on my laptop and some other machine), it is working without the least problem. [CODE]g++ -g -pthread -std=c++0x compute_gsea_thread_global_map_opt_results.cpp -o compute_gsea.out[/CODE] When I try to compile it on one of the … | |
Hello everyone, I am passionate about programming have started learning C++ and finished studying one book about it. I am done with the basics like pointers, arrays, variables, objects etc. What I need now is some way to go on from here and learn how professional programs are made and … | |
I wanted to delete data from my original text file "PHONE.txt" while my temp text file is "newPHONE.txt"..but after i do deletion the text only remove at temp file but not in original file..any kind soul can help me? Thanks! [CODE] else if(userInput == "Delete"||userInput == "delete") { string line; … | |
I have a function that takes a reference to an interface class as a parameter. I have created a derived class from the interface class, but when I try to call the function with an instance of my derived class as an argument I get a compiler error saying "error: … | |
Hi, I am new for C++ Program.I created a Exe using VC++.error message will occur when i run that exe(Ctrl+F5).The following error message will occur when exe run. [B]The thread 0x6CC has exited with code 0 (0x0). The thread 0xB10 has exited with code -1073741819 (0xC0000005). no matching symbolic information … | |
I'm working on a formula calculator. In it, I've designated user controls (it's in a console). The script keeps track of the user inputs by assigning all user inputs concerning navigation into a string labeled 'ans'. However, I can't seem to get the 'if' and 'else' function to work with … | |
Hello, I'm having a problem with finding and printing an element in a vector. I want to search my vector to see if an element starts with a sub-string, and if it does, I want to write the whole string to a file. The first part is done, I just … | |
Is there anyway we can clear only a selected part of the console window? clrscr() from conio.h & system("CLS") clears the whole screen. So how to clear screen selectively? For example, one of my old code prints this, [ICODE]Enter the limit for the array size (Max: 20) 10 Enter the … | |
Hi friends, Error Occur when i run the Project in C++? Error is: 0x5f43351b reference memory at 0x00000000 .The memory could not be "read".Please why will this error occur and How can i solve this problem? Please help me.IT is a Urgent | |
hi guy i already found a dimilar post for this but the code there didnt quite work. baisicly i am making a 2d game and i need to offset sprites. below is all the code i have for this sprite. obv thers more code but i think this is all … | |
I've made a program that creates a log of the activities performed in it, for easy reference for the user. But I want the program to automatically delete the file after the program is shut down. What is the syntax and how do I go about doing it? | |
Hey guys, I really need your help on this, because I'm either being really dizzy or I just can't figure out why my code isn't working at all. I've wasted around 4 hours trying to turn around this problem so far and I just can't. here is the part of … | |
Hi friends, This is my first post in this Site. I want to create a file from One device data .In that device connects via USB Cable One end.Please Help me. How can i achieve this? | |
There are two classes, ImageBase, and template <T> Image in a library I'm using. I want to store many of these images in a container, and then pass them to a function templates that expect an Image<T>. The only thing I knew to do was store ImageBase* in the container: … |
The End.