49,761 Topics

Member Avatar for
Member Avatar for rfrapp

I'm writing a program that rolls a die a number of times that the user enters, and counts up each time a one, two, three, and so on is rolled. Right now, it only prints out zero's. Any guidance would be appreciated! Here's my code: [CODE] // dice.cpp : Defines …

Member Avatar for WaltP
0
158
Member Avatar for triumphost

Why does it load my DLL but the pointer to the Proc returns 0? It loads the DLL and says "DLL Loaded" but it just won't say "Function Found." Help me please :)? [CODE] #include <windows.h> #include <iostream> //DLL Function: void DLL_EXPORT Theading(HANDLE hThread, DWORD ThreadID, void* FunctionToPass); typedef void …

Member Avatar for triumphost
0
2K
Member Avatar for bluewhale628

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 …

Member Avatar for Lerner
0
584
Member Avatar for hamby

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 …

Member Avatar for hamby
0
240
Member Avatar for triumphost

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] …

Member Avatar for nezachem
0
160
Member Avatar for Captain Neo

[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 …

Member Avatar for PrimePackster
0
133
Member Avatar for ahoysailor

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!

Member Avatar for daviddoria
0
219
Member Avatar for guccimane

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 …

Member Avatar for subith86
0
1K
Member Avatar for capton

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.

Member Avatar for AceStryker
0
2K
Member Avatar for lxXTaCoXxl

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 …

Member Avatar for mrnutty
0
122
Member Avatar for gfp91

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 …

Member Avatar for MandrewP
0
130
Member Avatar for azdonald

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 …

0
75
Member Avatar for newbyc++

[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++) …

Member Avatar for daviddoria
0
118
Member Avatar for biogig

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. …

Member Avatar for daviddoria
0
201
Member Avatar for siaswar

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 …

Member Avatar for daviddoria
0
174
Member Avatar for kbtiger88

[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 …

Member Avatar for daviddoria
0
530
Member Avatar for Dman01

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 …

Member Avatar for daviddoria
0
310
Member Avatar for Zhassan

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 …

Member Avatar for daviddoria
0
97
Member Avatar for sbrohee

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 …

Member Avatar for daviddoria
0
472
Member Avatar for Talli

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 …

Member Avatar for Talli
0
474
Member Avatar for swagen

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; …

Member Avatar for thines01
0
166
Member Avatar for Labdabeta

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: …

Member Avatar for Labdabeta
0
144
Member Avatar for naraayanan

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 …

Member Avatar for Narue
0
161
Member Avatar for Knoxarama

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 …

Member Avatar for Narue
0
292
Member Avatar for ahoysailor

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 …

Member Avatar for ahoysailor
0
295
Member Avatar for PrimePackster

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 …

Member Avatar for PrimePackster
0
2K
Member Avatar for naraayanan

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

Member Avatar for Moschops
0
67
Member Avatar for gfp91

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 …

Member Avatar for gfp91
0
102
Member Avatar for Mr Gates

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?

Member Avatar for brainysmurf0316
1
666
Member Avatar for Diogo Martinho

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 …

Member Avatar for WaltP
0
215

The End.