49,761 Topics

Member Avatar for
Member Avatar for Lucaci Andrew

Ok, so, this code snippet is a reply to this thread: http://www.daniweb.com/software-development/cpp/threads/425821/prime-number-c From what I understood form the OPs request, is that, he wanted an algorihm which would check for prime numbers in a given range, applying these conditions: a number is to be considered valid if: a. the number …

Member Avatar for RainbowMatrix
0
598
Member Avatar for stengeljjj

Using cout to produce output - double space = 4.0 - 1.9999999; cout << space << endl; result: 2 Why am I not getting 2.0000001 instead? What should the type be or the numbers to make this 2.0000001? Thanks

Member Avatar for JasonHippy
0
103
Member Avatar for daino

Would anyone know of a reporting toolkit library for C++ which can be compiled as part of a project. It will need to be ablue to display tables, display charts and be printable through a printer. Preferabely free though I haven't been able to find any at all. The closest …

Member Avatar for daino
0
513
Member Avatar for kris222

A means AMA but i cant figure out whats wrong cuz its gotta accept both capital and small letters help please #include<iostream.h> void main() { char x[2]; cout<<"What does the letter A mean in ACLC?"; cout<<endl<<"S:"; cin.getline(x,2); { if(x[0]=='A'||x[0]=='a') x[0]='y'; else x[0]='n'; { } if(x[1]=='M'||x[1]=='m') x[1]='y'; else x[1]='n'; } { …

Member Avatar for zeroliken
0
84
Member Avatar for BradenMurphy

I got this info off a website. tells u how to make a clock in C++... can anyone tell me how to make it so the PC doesn't use 100% cpu? if u look in task manager ull see <ProjectName> is using 100% cpu [code=c] // crt_clock.c // This example …

Member Avatar for Ancient Dragon
0
203
Member Avatar for samohtvii

Hi all, I am trying to write a CWEB c++ program that just keepsgoing until the user types 'no'. Anyway i get some errors that I can't fix. Here is the .w file (x's are comment blocks to save congestion) @* Program Skeleton @ x @c using namespace std;@; @<Header …

Member Avatar for samohtvii
0
163
Member Avatar for streetalex310

4B 50 7B F1 F4 F5 5E 50 7B F1 F4 F5 5E 4B 4B 4B 4B 50 7B F1 F4 F5 5E 4B 50 7B F1 F4 F5 5E 50 7B F1 F4 F5 5E 4B 4B 50 7B F1 F4 F5 5E 4B 50 7B F1 F4 F5 …

Member Avatar for ravenous
0
142
Member Avatar for MrEARTHSHAcKER

Hi, Do you have any useful explanation of how to create a draggable window? What I wish to say is when you select your window will have no border ( considering that, it cannot be dragged around screen), how to make it draggable, for example by making a certain area …

Member Avatar for 7c00h
0
155
Member Avatar for MasterHacker110

I am trying to make something like a firewall but it isnt a firewall it is just suppose to see all the incomming and outgoing connections of each port. And put the IP address and port into a .txt file. Basicly creating a log of incomming and outgoing connections. Nothing …

Member Avatar for L7Sqr
0
219
Member Avatar for MasterHacker110

I use code::blocks as an IDE but now i want to create a .dll file. I have followed this tutorial however it is for VC++. TUTORIAL: http://msdn.microsoft.com/en-US/library/vstudio/ms235636 I am strugeling becuase I am used to creating .dlls in C#. They are so easy. You just create a new library project. …

Member Avatar for Valaraukar
0
395
Member Avatar for soapy.thomas

**Hi there, I'm new to C++ (bet you guys don't hear that very often!!) and what I'm trying to do, in a console application, is this: 1. Ask for a number 2. If the user input isn't a valid float, get angry and go back to 1. 3. If the …

Member Avatar for m4ster_r0shi
0
398
Member Avatar for RonKevin

Okay so here's the thing...I came across a code of my classmate that i'm not familiar with...the only thing i know is the printf is the same as cout...right??can someone explain this in iosteam.h form?? #include <stdio.h> void bubble_sort(long [], long); int main() { long array[100], n, c; printf("Enter number …

Member Avatar for RonKevin
0
167
Member Avatar for haroonrulz

Dear C++ Gurus/Experts, I am writing a program to automate excel.My program is working well when I use integer (Write/Read) in excel.My program also works well when I use string.But the issue appears when I use array of strings.I am getting the issue as below **"error C2664: 'SysAllocString' : cannot …

Member Avatar for Ancient Dragon
0
309
Member Avatar for Eagletalon

Hi there everyone... Allright my setting is this: I have written an C++ application that receives input from a user app, converts it to XML, and then posts it to our ERP (Syspro) through e.net COM objects using ActiveQt and in specific QAxObject... The problem is this: QAxObject inherits from …

Member Avatar for Eagletalon
0
979
Member Avatar for every1play

any idea on how to change strcpy in c++ int main() { //all the winning combination strcpy(winKey[1].key, "123"); strcpy(winKey[2].key, "456"); strcpy(winKey[3].key, "789"); strcpy(winKey[4].key, "147"); strcpy(winKey[5].key, "258"); strcpy(winKey[6].key, "369"); strcpy(winKey[7].key, "159"); strcpy(winKey[8].key, "357"); }

Member Avatar for deceptikon
0
245
Member Avatar for PinoyDev

Good day! I have started a little inheritance on my simple class that takes the addition function of two numbers on the other class but the sum is always zero even if it is not supposed to be. Here is my code so far: #include<iostream> using namespace std; class Addition …

Member Avatar for iamthwee
0
148
Member Avatar for cherz

guys... teach me... a-z of ADO connetion of my sql server with VC++... soon... or.. im trapped!!! how do u enable the connection setting?? and i am using VC++ 2005..

0
70
Member Avatar for angelineang

I doesn't know why my program after enter main menu and want to call any other function will stoppped working,this is the question Write a program that is able to help a school teacher to input, manipulate and record marks of students for 8 subjects. These subjects are English, Physics, …

Member Avatar for Lucaci Andrew
0
202
Member Avatar for Despairy

Hey I just tried using the OpenCV for the past few hours but I keep on failing. I am a Windows 7 user with Visual Studio 2008. I followed the instructions for OpenCV2.2 (whilst downloading the newest stable version 2.4) did the CMAKE phase exactly the way it says . …

Member Avatar for DJSAN10
0
260
Member Avatar for theju112

please visit the following link: http://www.techgig.com/codecontest/problem/Rolling-Dices-36 click on participate and please see the code editor on the right side. In the code skeleton there, you can see a function with taking two arguments,both character arrays. I know a method to solve this problem if both the arrays were integer arrays. …

Member Avatar for Lucaci Andrew
0
149
Member Avatar for emmykofi
Member Avatar for Vish0203

Hey! i've been trying to create a header file using dev C++ but i'm stuck with sum errors. Can anyone help me out in this? #ifndef SUM_H #define SUM_H template <class T> class add { private: const T a,b; public: T sum(T,T); void displaysum(); }; template <class T> T add::sum(T …

Member Avatar for deceptikon
0
160
Member Avatar for every1play

Recently i saw this code on the net and i have some questions taht i dun understand. Hope some1 can help to ans. #include <iostream> #include <stdlib.h> #include <time.h> #include <string.h> using namespace std; struct combos { char key[3]; char holder[3]; }; void displayBoard(); //display board void computerMove(); //AI;s Move …

Member Avatar for nishavas01
0
210
Member Avatar for Pugee

Creating a simply data base to store these variavles. The three entities are book, brower and Records. Using these we will create a simple database from dev c++.

Member Avatar for deceptikon
0
99
Member Avatar for daino

A really rooky question here but I'm still trying to understand something. If I'm using WXWidgets I assume the purpose of the GUI is to provide a trigger point from where I can process event s via the event loop. I basically create the gui as I want it and …

Member Avatar for daino
0
257
Member Avatar for Venaplex

Hello I am an beginner programmer in: Java,C++,C i was wondering if anyone could help me make a online language conversion tool that can convert from java into C++ Any help will be appreciated

Member Avatar for nmaillet
0
113
Member Avatar for manishanibhwani

in the following code how does the compiler comes to know that it has to call the postfix function class Digit { private: int m_nDigit; public: Digit(int nDigit=0) { m_nDigit = nDigit; } Digit& operator++(); // prefix Digit& operator--(); // prefix Digit operator++(int); // postfix Digit operator--(int); // postfix int …

Member Avatar for admin1982
0
162
Member Avatar for neithan

Hi! I understand almost all basic theory in C++ (including templates, inheritance, STL etc.) and I'd like to start understanding C++ in Windows, specifically stuff related to memory, calls, hooks, stuff like that. I don't visualize what do I want to do exactly (probably that's why I'm asking here) but …

Member Avatar for np complete
0
235
Member Avatar for TheEroteme

I came up with a bit of code that I think will theoretically factor any given integer within the range of integers. I'm posting this thread to ask two questions: First, is there any way that I can do this more efficiently, and second, what is the easiest way to …

Member Avatar for Kwetal
0
177
Member Avatar for lmd141

Hi there, I'm fairly new to this C++ thing so I hope you can help. I'm writing a program that prints out the coordinates of atoms in a simulation box (30x30x30). I have a fair few header and .cpp files so I'll only paste the bits that are faulty. I …

Member Avatar for ravenous
0
256

The End.