Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
75% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #3K
~16.6K People Reached
Favorite Tags
Member Avatar for djbsabkcb

Below is my code for printing prime numbers up to a given input by user. However, my calculations are not working correctly and my output is printing twice. Any idea? :sad: #include <iostream> #include <cmath> using namespace std; void prime_num(int); int main() { cout << " Enter a number and …

Member Avatar for duskoKoscica
-2
2K
Member Avatar for sidra 100

hey how to clear the screen in c++ i m using dev c++. clrscr()doesnot work

Member Avatar for adityatandon
0
209
Member Avatar for Decency

hey, i was wondering what is the best idea for a computer science project to be done, i thought a 3 D virtual city will be very helpful for tourism and educational purposes, its also fun to program. does any one have better ideas? ;)

Member Avatar for naveen jeshanth
-1
139
Member Avatar for Skeen

Okay, I'm making a shooter game, and all my weapons are differnt userdefined objects; ie. the flamethrower works differently then the gun, however, I'm calling some functions in my "main", an example of this would be; [CODE] /* <Init> */ MachineGunClass *CurrentWeapon; MachineGunClass *MachineGun; MachineGun = new MachineGunClass(); CurrentWeapon = …

Member Avatar for mrnutty
0
222
Member Avatar for JustSuds

Hi everyone, I just can't seem to find an explanation for using this "->" in code, in C++. I've migrated from Java and C#, and haven't seen this notation before. Basic example: [CODE]CMesh *pMesh = WorldObjects[i]->m_pMesh;[/CODE] As best as I can tell, this is the C++ equivalent of C#'s [CODE]WorldObjects[i].m_pMesh;[/CODE]. …

Member Avatar for Skeen
0
90
Member Avatar for deorcar

hi im working with opengl/sdl and im still new to it what im trying to do is to make a 2nd box or sprite that will follow the frist box ive made can anyone help me out here is some of the code i have [CODE]#include "sdl.h" #include "GL_Functions.h" #include …

Member Avatar for Skeen
0
124
Member Avatar for Skeen

So I've got this program I made, and I wanted to speed it up, using multithreading, to make use of my quad core. The program itself fully supports multithreading. The problem is, that when I'm running the program, using just one; CreateThread() it finishes in 6seconds, if I run 2 …

Member Avatar for ireshagun
0
102
Member Avatar for Skeen

So I'm working on this class, which is basically to wrap a char into 8bools, and it works so far, however I'm running into a problem, in the dedication of values, since I'm to use the overloaded array operator, as well as the overloaded assignment operator, at once, however I …

Member Avatar for dusktreader
0
128
Member Avatar for Skeen

So I've been working on two small programs to calculate prime numbers, fast and memory efficiently. Both my algorithms are based upon the 'Sieve of Eratosthenes', and I know that the 'Sieve of Atkin' would be the way to go since its faster, however I'm just trying to optimize the …

0
84
Member Avatar for Skeen

So I'm working with OpenGL, and DevIL to load some JPEG into my program, and I've had some trouble, I've isolated the program in a simple sample program (uploaded), the program is, that when I load the standard file, that came with the guide ("Geeks3D.jpg") it loades instantly and runs …

Member Avatar for Skeen
0
106
Member Avatar for Skeen

So I'm working on this game, and I've been using "glaux.h" to load my textures, however I'm interrested in using JPEG's, so I found an example to do this on: [url]www.morrowland.com[/url], however, when I compile it (after fixing the errors), then I get this, on the linking state, any help …

Member Avatar for Skeen
0
107
Member Avatar for CppBuilder2006

in Windows Task Manager --> Processes there is a list of running exe files. I am going to write a program that lists these running exe files. How can I obtain the list? I use Windows XP :$ & Windows API!:)

Member Avatar for marco93
0
309
Member Avatar for Skeen

So I'm quite new to c++, and I'm really into pointers, does anyone got like, an idea on how to really get to know pointers, assignments, tasks, tutorials, ect. Basically, my knowledge in C++, is classes, operator overloading, and like simple stuff, so if you're able to come up with …

Member Avatar for manishanibhwani
0
90
Member Avatar for Skeen

Okay, I'm making a game, and I need to use random inside a class, however I can't figure out how to seed the randomness into the class, so atm I'm getting the same random each time. I've tried stuff like srand(time) in main, however, that doesn't apply to the class, …

Member Avatar for Skeen
0
109
Member Avatar for Skeen

I'm making this snake game, and I've created a class to handle the snakes (players and AI snakes), this works out quite well, however, at the moment I'm declaring my main snake (player 1), as global, in terms of: [CODE] class Snake { //... Lots and lots of code. } …

Member Avatar for Skeen
0
204
Member Avatar for ziyakhan10

I am trying to write a program to find nearest prime to a number to its left...using for loop i just don't seem to get it right [CODE] #include<iostream.h> #include<conio.h> void main() { clrscr(); int n1,flag=0; cout<<"Enter The Number"<<endl; cin>>n1; for(int i=n1;i>0;i--) { for(int j=2;j<(i/2);j++) { if(i%j==0) { flag=0; } …

Member Avatar for Skeen
0
4K
Member Avatar for Mafia619

Hey, I've got an assignment from my computer teacher in school. I've got to make a program that displays the prime numbers in a range and also display the number of prime numbers that are present. And i'm only supposed to use the basic header files.....that means the program should …

Member Avatar for VernonDozier
0
287
Member Avatar for mybluehair

Long story sort, I'm making a thread in c++ that starts a timer. When a user starts playing the game, it starts the thread, and when user logs out - thread stops. - thus giving me the total time played. Problem: When using the code to start the thread - …

Member Avatar for Skeen
0
164
Member Avatar for dmm

can I open a file and then close it in a loop? I tried but it doesnt seem to work. :(

Member Avatar for shakunni
1
90
Member Avatar for xueyingkoo

Hello, i already have C++ class few month , but i still find difficult to write the problem analysis on this project ... This is my question ... "Problem Specification A small scale Airline Company bought a new computer to computerize their airline ticket booking system. The company’s CEO asked …

Member Avatar for Skeen
0
2K
Member Avatar for samsons17

how do i display something like this using for loop? 0 2 4 6 8 10 12 14 18 24 26 28 30 32 thank you for helping...

Member Avatar for Skeen
0
311
Member Avatar for juniper2009

Dear All I would be very happy if you could help me! I need to create a main() program which is be able to; * reads in a list of words and their associated meanings from the given test file(file.txt)(This file contains 10 lines) * provide an interactive menu interface …

Member Avatar for juniper2009
0
800
Member Avatar for violet101

Help!!! I'm trying to eliminate the highest and lowest number out of 5 inputs then get the average of the remaining 3 inputs... In some instances, it gives me incorrect average.. (We are not suppose to use arrays yet) Here's my code: #include <iostream> using namespace std; void getData(double& input1, …

Member Avatar for violet101
0
157
Member Avatar for ninatech9

Hi, this is one of my hw problems for the week and having trouble writing this code.-- QUESTION: 1. Create a program that will generate a 10 question math quiz for single digit addition. Your program should create 2 random numbers in the range of 0 – 9 and then …

Member Avatar for Skeen
0
2K
Member Avatar for Mohamad89

Hello, I am currently doing a research at my university about the ways in which we can use multicore CPU to enhance graphics performance instead of putting all the load on the GPU, I am trying to work with both OpenGL and OpenMP and I am planning on using gDebugger …

Member Avatar for jbennet
0
190
Member Avatar for EastJohn

This is basically my code. It says build succeed, but I get nothing. What am I doing wrong. The user inputs a sentence, for example, Hello. (I've taken out other parts such as return LOWERCASE, return DIGIT, and what would happen in those cases for ease of reading). The program …

Member Avatar for Skeen
0
128
Member Avatar for jv44heinzbar

Hi, I'm trying to encrypt a simple .txt file. What I want to do is is described by the function definitions. I want to change all my characters in the .txt file to lower case and then convert any digits found into *. I've done this before in the past, …

Member Avatar for Skeen
0
352
Member Avatar for Skeen

I've been having some thought, like, if I run a program, and I'm exporting a pointer to a variable "a" to a file, and I reads that information with another program, wouldn't the second program be able to modify "a" in the first program using that pointer? - Like the …

Member Avatar for Frederick2
0
88
Member Avatar for Skeen

Sorry for doing this, but anyone with GLUT experience willing to look though a little code, since it's not working at all; I posted the thread here: [url]http://www.daniweb.com/forums/thread235691.html[/url]

0
59
Member Avatar for Ponomous

Hi, So i have written my code to solve the quadratic equation and it works. The thing I need to do is to read values for 3 variables from an input .txt file until the end of the file and output the answers for each set of variables. The variables …

Member Avatar for Fbody
0
202