49,761 Topics

Member Avatar for
Member Avatar for zobadof
Member Avatar for mrnutty
0
95
Member Avatar for p3rsia

hi i tried to do this q but i stuck in the middle of writing codes Write a program that creates an array dynamically whose pointer must not change, initialize the array to random values between 0 and n (inclusive) using rand () where n is a value entered by …

Member Avatar for Clinton Portis
0
160
Member Avatar for nerdthon123

To All Daniweb users, I have just started the programming trail of learning, i recently got courses from E learning center on how to use C++. The first Code (the hello world project) is where I'm having a problem. On Visual Basic 2010 Beta2 which is the only one that …

Member Avatar for jonsca
0
123
Member Avatar for trzypak

so i was supose to create a software for my class that converts the 24 hour notation to 12, but now i got really lost with it i used the A symbol to display am and the P symbol to display pm heres what i have so far but i …

Member Avatar for jonsca
0
114
Member Avatar for discovery-power

Hi All, I recently made the move from Windows to Mandriva Linux 2010, in Windows I used an IDE to write my code then build my projects, in Linux I cant find a suitable IDE im really struggling to build my projects. Now I can write my projects in kwrite …

Member Avatar for discovery-power
0
113
Member Avatar for Puddles

I am attempting to write a program that interfaces with Command prompt (simple, bring up a tasklist, user enters the program they want to get rid of, and then the computer does the rest), I already have been able to interface and bring up a tasklist, the code compiles with …

Member Avatar for Puddles
0
232
Member Avatar for jigglymig1

this function needs to ask for a persons name, phone number, and email. BUT it only needs to do this once at a time because it returns to a menu and asks if they want to add more people. I need a way to increment count by 1 each time …

Member Avatar for tkud
-1
110
Member Avatar for tkud

Hey everyone, I'm having this problem with the aforementioned API. Here is the code to initialize the common controls i want to use..(commctrl.h is already included in my program) [CODE] INITCOMMONCONTROLSEX icex; icex.dwSize=sizeof(INITCOMMONCONTROLSEX); icex.dwICC=ICC_BAR_CLASSES; InitCommonControlsEx(&icex); [/CODE] However, when I try to build , it gives me this error: [I] 1>tkud.obj …

Member Avatar for tkud
0
3K
Member Avatar for zobadof

I have learnt: Hello World, Input, Operators, Square of a number, Making decisions and Repeated question. I don't know what would be best; either to revise on that, or move onto something else. I would like to know what would be the best idea for me next. Thanks, Zobadof

Member Avatar for zobadof
0
50
Member Avatar for zobadof

Sorry in advance! I did solved thread before I checked if the code somebody said worked. It turned out they didn't help much. The problem is MattyRobot gave me code to open a new window. Now it opens with CMD to; I only wanted the window. I will give you …

Member Avatar for zobadof
0
129
Member Avatar for kele1

i'm writing a program that creates a file called 'hardware.dat' and i'm supposed to be able to insert a record, update, and delete a record. first i'm having problem with the insertrecord cause it keeps giving me an infinte loop. i'm creating file that would hold these data: record # …

Member Avatar for Clinton Portis
-1
95
Member Avatar for trcartmill

[CODE]void GetData(fstream& In, string& Name, double& Acres, int& Jars); /*Pre: The stream in is open for input. Post: Returns the name of less than or equal 29 characters, acres and number of jars. */[/CODE] I am using this function to pull names from an infile. The first line of the …

Member Avatar for Clinton Portis
0
106
Member Avatar for C++ Beginner

When I run the program it only prints out the numbers entered into the array but it will not print out the name of the array. Can anyone assist me on why it is not working? Example: The amount each salsa sold are: 4 The amount each salsa sold are: …

Member Avatar for zobadof
0
73
Member Avatar for mloC

This Program is supposed to get a filename, title and description of a database and then store it to and appropriate filename. [CODE] #include <fstream> #include <iostream> #include <cstdlib> #include <string.h> #include<ctime> #define MAX_FILENAME 256 #define MAX_INIT_NAME 1024 #define MAX_DESC 1024 using namespace std; class date { public: int DAY; …

Member Avatar for mloC
1
94
Member Avatar for FancyShoes

I am having problems with my white pegs for my mastermind game. The white pegs mean that the user guessed the right color but it is not in the right spot. The problem is that it prints out the white too many times for 1 guess. The problem is in …

0
84
Member Avatar for merse

It is possible to restrict template parameter? [CODE]template <class T> class myclass { ... };[/CODE] For example I want that T might be int double or my own defined complex but nothing else!

Member Avatar for mrnutty
0
244
Member Avatar for hotice47

Hi .. i am new in programing and i need to solve this problem ..so far i have done few things but there are some thing missing which i can understand ....so plz help.. The program is to be used to calculate the loading on a beam by a single …

Member Avatar for hotice47
1
136
Member Avatar for new programer

hello all I'm trying to do a concatenation function I do not want to you use the strings property where we can add strings, I need to add two strings and save them in one string without the use of addition "+" i have three variables title , first_name, last_name …

Member Avatar for new programer
0
151
Member Avatar for merse

I have a very simple code and I don't understad it's result. I think, this have to print "OK" but does not! [CODE] #include<iostream> #include<math.h> class real { double value; double error; public: real(double,double); friend bool operator==(const real&,const double); }; real::real(double val, double err) : value(val), error(fabs(err)) {} bool operator==(const …

Member Avatar for merse
0
99
Member Avatar for halluc1nati0n

[CODE]#include <stdio.h> #include <fcntl.h> #include <iostream> using namespace std; int main() { int fd, i, oflag; char buf[100]; oflag = (O_RDONLY); fd = open("from4to5", oflag, 0x1c0); if (fd < 0 ) {printf("Error opening\n"); exit(1);} while ( (i = read(fd, buf, 16)) != 0 ) { cout << "child: # bytes …

Member Avatar for halluc1nati0n
1
307
Member Avatar for biesczadka

Can anyone show me how I should split my code for makefile???? and how makefile would look like?? I must say that I have NO IDEA how to do that Actually I think that I don't understand how makefile works I'll be gratefull for help!!!!!! MY CODE: [CODE] #include <iostream> …

-1
55
Member Avatar for merse

[CODE]#include<iostream> #include<math.h> class real { double value; double error; public: real(const double,const double); double get_value(); double get_error(); friend bool operator<=(const real&,const double); }; real::real(const double val, const double err) : value(val), error(fabs(err)) {} double real::get_value() { return value; } double real::get_error() { return error; } bool operator<=(const real& x1, const …

Member Avatar for Narue
0
114
Member Avatar for MattyRobot

what would be a good way to load images to use for texture mapping in opengl? I have looked at tutorials such as nehe lesson 6 and some other resources but they all use something old and depreciated that I cant compile.

Member Avatar for Sodabread
0
325
Member Avatar for Natique

Hi, I wrote a program where I get a debug assertion failure. I've made it so that if I press ignore, execution continues correctly. The only thing is I don't want to keep pressing ignore, is there a way to make it ignore automatically? Without the message box appearing? I …

Member Avatar for Narue
0
1K
Member Avatar for f0rcegr0wn

Hi all, just to be sure. I have a C++ DLL in which I am implementing a bit of low-level functionality. To this library I wish to pass a managed System.String pointer (ref) so that the library can load the string with the new/returned value. The question is, do I …

Member Avatar for cikara21
0
176
Member Avatar for kavourdoukos

I have got this class:[CODE]class sample{ private: int number; string adress; public: int get_number(); string get_adress(); sample(); ~sample(); };[/CODE] I allocate dyanmically memory space like this(cause i need an array of pointers to obects):[CODE]sample** samples; samples=new sample*[20]; for(int i=0;i<20;i++){ samples[i]=new sample;}[/CODE] My question is how can i sort this array …

Member Avatar for JasonHippy
0
151
Member Avatar for confusedndazed

Hello all, I have my assignment topic and I know what information I would like to include in my assignment. Can anyone tell me how to put my data into top-down format? Here is what I have thus far: I'm trying to design a program that will input ages of …

Member Avatar for confusedndazed
0
118
Member Avatar for indev

Hey everyone. Some back info : I have been developing in C for about a year now on and off. Recently I grabbed myself a C++ book and am progressing at a steady rate. Up until recently I have been developing small applications and done a lot of ports. Wolfenstein …

0
41
Member Avatar for zainhamza

hi, I'll be greatful if someone tell me how to declare the preiority queue in c++ and also tell me the syntax that how we can put a node in a preority queue. Regards Zain

Member Avatar for Narue
0
217
Member Avatar for zobadof

MattyRobot as you may know him, gave me the code to make a new window, but it opens up cmd window too. I would like it so the window opens only. If anyone knows the code, I would be more than happy to find out

Member Avatar for zobadof
0
121

The End.