49,757 Topics

Member Avatar for
Member Avatar for johans22

I use visual studio tool. This compiles but no real output. [CODE]#include <iostream> #include <windows.h> #include <cstdlib> struct somestruct { char *name; int number; }; void mythread(void *lpParam) { somestruct* p = static_cast<somestruct*>(lpParam); printf("%d\n",p->number); ExitThread(0); } int main() { DWORD thread; struct somestruct *p; p = (somestruct*)malloc(sizeof(struct somestruct)); p->name=(char*)malloc(strlen("First Last")+1); …

Member Avatar for daviddoria
0
85
Member Avatar for MasterGberry

Note, this is converted from C# with a converter program and some of my own hand coding, there is definitely a possibility that the compiler is right and something of the sort does not exist in C++, or its named diff. I am having an issue with the long !System::Windows....line, …

Member Avatar for MasterGberry
0
246
Member Avatar for alonewolf23

[CODE]#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { char ch, play_or_no_play='y'; while (play_or_no_play == 'y') { cout << "Enter a character: "; cin >> ch; while (ch != 'c') { cout << "Wrong Character, try again: "; cin >> ch; } cout << …

Member Avatar for alonewolf23
0
149
Member Avatar for gth759k

I'm trying to add a way to create scenes for my raytracer without having to recompile it every time. So far i've gotten the irrXML parser up and working. My xml file declares all the scene properties I need and i can get them into my raytracer, but my problem …

Member Avatar for ravenous
0
240
Member Avatar for johans22

I am sort of new to forums, therefore forgive me for mistakes. I am trying to eliminate a for loop within a function and run the function in multiple threads. Is it possible?. The comment inside the code, explains it. Any reasonsble change that results in a good multi-threading. [CODE]#include …

Member Avatar for johans22
0
97
Member Avatar for rabihayass

I have to make a simple 3d game. The game scenario consists of a spacecraft that is attacking the home planet by firing rockets from along its length randomly. The game player moves the baton up and down to stop the rockets before they reach the planet. The star field …

Member Avatar for daviddoria
0
176
Member Avatar for sanjanac++

I'm using turbo c++ to build a project for school. It is compulsory to use TC++. I tried downloading windows.h but it gives a lot of errors when compiled. Is there any link i can use to do so easily without many problems? Tuesday is the deadline. Please help!

Member Avatar for ravenous
0
90
Member Avatar for Drakarus

I am making a program that involves adding time. It involves adding a beginning time, duration which would lead to the result of an end time from the sum of beginning time and duration. I will illustrate the problem i am having below: 12:15 start time with a duration of …

Member Avatar for nathanseye
0
98
Member Avatar for thelostboy

Hello all!! First of I just want to say that this is a great site. I am just looking for some advice I have just started studying for my degree in software development. I have been reading a lot of books on software development and they all say the wau …

Member Avatar for TSims11
0
158
Member Avatar for ethanbuckley

I have created a music player that is yet to function to its full ( the add button on my main form1 won't bring up the AddNewWaveTrack_form ). These errors vary so any help is much appreciated as I want to learn fast. [CODE]#pragma once #include "AddWaveTrack_form1.h" #include "EditWaveTrack_form1.h" namespace …

Member Avatar for TSims11
0
364
Member Avatar for tomtetlaw

I'm trying to use a DLL that is generated from one of my projects. When I try to compile I get alot of linker errors from ONE of the files from the DLL project. What I think is the problem is that I should be linking to the .lib file …

Member Avatar for tomtetlaw
0
168
Member Avatar for BChicago

Hi, I'm trying to add a drop down combo box for user selection in the main window of my application. The program reads USERS.txt, loads each line into a const char*[] and (hopefully) adds them to the combo box. The problem is my program displays Chinese characters instead of the …

Member Avatar for Ancient Dragon
0
528
Member Avatar for MasterGberry

Okay, so I understand this C# program I was given to analyze, and now I am being told that I need to convert the entire program into C++, just my luck. So there are several features that at the moment I do not understand how to convert over. If there …

Member Avatar for MasterGberry
0
251
Member Avatar for prgmwitch

Hello, I'm working on a program that requires an XY coordinate plan and I can't seem to find a source anywhere!! that shows how to print a "." or "+" or anything at a certain xy coordinate on the screen. for instance, I need to be able to take 2 …

Member Avatar for mrnutty
0
240
Member Avatar for jitender939

plz help me on this question..... 1 2 3 4 5 6 7 8 9 how i can swap this like this 3 2 1 6 5 4 9 8 7 plz soon.......

Member Avatar for Red Goose
0
120
Member Avatar for by_stander

Help.... I have 3 vectors I want to store in 1 array, but I can't figure out what I'm doing wrong [CODE] vector<double> range, az, el; double RAzEl[1000][3] = {}; for ( unsigned int j = range; j <= (num); j = j + ncols ) { range.push_back(row_d[j]); } for …

Member Avatar for by_stander
0
2K
Member Avatar for linova

Hi.. Could anyone help me to find out why this program cannot count the frequency of each alphabet? There is a output for calculating the total lines and length but not the frequency.Appreciate any help. Thanks! [CODE] int main() { const int MAXLENGTH=10; const int MAXCHARS=10000; static double i[26]; char …

Member Avatar for WaltP
0
155
Member Avatar for cute cat

[COLOR="Red"]can [/COLOR]you help me!! I have assignment that told me to write a function 'CheckSmaller' that takes two linked list as input arguments. These linked list contain numbers like this: num1->3->5->2->NULL (assuming that num1 is pointing to number 352) num2->4->3->9->1->NULL (assuming that num2 is pointing to number 4391) The function …

Member Avatar for Red Goose
0
201
Member Avatar for thelostboy

Hi all This is for anyone that saw my other post I am developing a reservation system for a restraunt as a means of gaining experience and improving my programming. What I was windering I was hoping to implement a process where one restraunt could take the reservation for any …

Member Avatar for Narue
0
115
Member Avatar for wrathmakin

Hey guys, I'm new to these forums and new to C++ in general. I have been looking around the forums and I have found threads with similar issues to mine but unfortunately they don't cover my exact issue. Essentially I want to make a histogram in C++ that takes a …

Member Avatar for wrathmakin
0
4K
Member Avatar for MasterGberry

So I made a program, and have thoroughly tested the bugs out, and now finally figured out how to make a release build for my grandfather to see. So he tries running it and it crashes on the first input. I was told i may need to send him the …

Member Avatar for MasterGberry
0
74
Member Avatar for jaglever

I need to read a file which looks like this: model=binomial steps=1 time horizon=1 S=101 u=1.2 d=0.95 r=0.03 number of instruments in portfolio=2 instrument=option exercise=european position=short type=put strike=98 expiry=1 instrument=option exercise=european position=long type=put strike=10 expiry=1 and i just need to read everything what is on the right site of '=' …

Member Avatar for VernonDozier
0
219
Member Avatar for nickoooname

Hi Guys, Im currently working on a school project but im stuck, if worked on this problem for over 4 days now and i cant fix it. Using Direct3D 9, Visual studio 2010, im trying to make create a heightmap. Im using a bmp file. Problem: the heightmap doesn't show …

0
129
Member Avatar for alex-VX

when i try to compile stuff i get this [code=c++]c:\program\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(53): error C2143: syntax error : missing ';' before '{' c:\program\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(53): error C2871: 'vc_attributes' : a namespace with this name does not exist c:\program\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(53): error C2447: '{' : missing function header (old-style …

Member Avatar for jonsca
0
472
Member Avatar for sahil1991

hi, i was just wondering if there is some special technique to understand the code which is not yours.i may sound peculiar so letme make it a bit clear.i hav just recently done some c++ programming and being able to make some programs.not too complex but i can do some …

Member Avatar for sahil1991
0
211
Member Avatar for LevyDee

Hi all, the setup is as follows: -One base class -My top layer class that holds: -Four derived classes from said base class(four different types of objects that all derived from my base class) Is it possible to have a function in my top layer class that has one object …

Member Avatar for LevyDee
0
93
Member Avatar for freakyboard

[CODE]class x{int a;}; class y:public x{}; main(){y k; k.a=3; } [/CODE] How can I access "k.a"? PS: You can't change or omit any part of the code. a have to be private. Member access specifier have to be public ( class y::public x ). You can add functions to x …

Member Avatar for embooglement
0
121
Member Avatar for matthewkeating

Hello, I am looking into testing the performance of different numerical datatypes like double, integer, float, etc and see which one is the fastest. Is there a way to do this in C++. Time the time it takes to do basic arithmetic with numbers. Starting and end a timer within …

Member Avatar for mrnutty
0
126
Member Avatar for MasterGberry

I know there is an easy way to do this in C#, but i was wondering about C++. If I want to have an ifstream object defined that will read the input of a file, but i want it to read backwards. So basically here is the format I have. …

Member Avatar for MasterGberry
0
102
Member Avatar for Juginx

Hey First: How to get Length of textbox(how much sings have text) @edit : NVM first! Secound: I have Film Duration 00:00:22 and i must add that to xx:xx:xx how i can do that?

0
59

The End.