49,761 Topics

Member Avatar for
Member Avatar for sm4ckth3monkey

Hello I am working on a project for my roommate that involves reading in a text file that has x's and o's. The x's mean a wall and the o's mean an open path. The maze begins at 0,0 and ends at 15, 15. This makes the graph 15x15. I …

Member Avatar for VernonDozier
0
1K
Member Avatar for tom384

Hi there, I'm having trouble with my program, which crashes when accessing values through a pointer. I've created a sample program that demonstrates my problem. Little synopsis: A Character has 2 attributes, a Bone, and a vector of pointers to Bones. I have a parser file that has functions to …

Member Avatar for tom384
0
273
Member Avatar for heynow12

I cannot figure out what this error message means? [code] #include <iostream> using namespace std; double max_array(const double x[], int max_val); int main (void) { int i, max_val; double x[max_val]; double array_avg, array_max, array_min; cout<<"Enter likely number of values: "; cin>>max_val; cout<<"Enter values seperated by white space:"; for (i=0;i<max_val;i++) cin>>x[i]; …

Member Avatar for josolanes
0
1K
Member Avatar for aeolusaether

Hello daniweb. Seems like this site is amongst the latest and the greatest in programming and software development. Anyways: [B]Attempt to compile with gcc: [/B]C:\>gcc -o ywordf ywordf.cpp [B]Error:[/B] ywordf.cpp: In function `int main(int, char**)': ywordf.cpp:30: error: no match for 'operator!=' in 'i != __gnu_norm::multimap<_Key, _Tp, _Compare, _Alloc>::rend() [with _Key …

Member Avatar for aeolusaether
0
246
Member Avatar for JohnPhilipps

Good evening everyone, I would like to ask about copy constructors. I have been working on a base\derived class C++ program in which I am trying to compare the areas of a couple of Rectangles, and once I get past the errors I am currently having, I wouldn't mind comparing …

Member Avatar for jonsca
0
1K
Member Avatar for vbx_wx

Does anyone know a function equivalent to GetAsynKeyState() ? to test if a key is pressed? i am trying to use it for a keylogger...and except windwos hooks,thanks

Member Avatar for Nick Evan
0
105
Member Avatar for merse

Is it possible to delete a non dynamic variable? Or is it automatically deleted when I construct a new one with the same name? [CODE] int N; int N; [/CODE] Is this possible? My purpose is, that I want to use an object from a class in a loop: [CODE] …

Member Avatar for mrnutty
0
135
Member Avatar for yakovm

I wrote winapi application.Which during creation defined : [code=c++] CreateGLWindow(hwnd,"OpenGL",800,600,16,fullscreen); CreateWindow(TEXT("button"), TEXT("Choose Shading Mode"), WS_CHILD | WS_VISIBLE | BS_GROUPBOX,10, 610, 300, 120, hwnd, (HMENU) 0,hInstance, NULL); CreateWindow(TEXT("button"), TEXT("Wireframe"), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,20, 630, 100, 30, hwnd, (HMENU)IDC_M_WIRE , hInstance, NULL); CreateWindow(TEXT("button"), TEXT("Flat"), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,20, 660, 100, …

Member Avatar for yakovm
0
249
Member Avatar for hurricane123

i made the following program but its not working can someone tell me where i did mistake [CODE]#include <iostream> #include <cstdlib> #include<cmath> #include<iomanip> #include <cstring> int myStrlen (const char* s); int main() { cout<<myStrlen; } int myStrlen (const char* str1) { char str[25] = "How"; strlen(str); return strlen(str); }[/CODE]

Member Avatar for Banfa
0
90
Member Avatar for theABCasian

here is the other problem project im sure it's something small im missing. for some reason there is no print out for the most used letter demo.cpp [CODE] /* File Name: demo.cpp Chapter No. 12 - Exercise No. 9 Programmer: Carl Sue Date Last Modified: Mar 23, 2010 Problem Statement: …

Member Avatar for jonsca
0
67
Member Avatar for bandit711

[CODE] #include <iostream> #include <fstream> // I/O #include <iomanip> // For setw() using namespace std; ofstream outputfile("output.txt"); // Output file const int MAX_FILE_NAME = 35; const double INTEREST_RATE1 = 0.010; const double INTEREST_RATE2 = 0.010; const double LEVEL_ONE_BALANCE = 1000.00; const double MINIMUM_PAYMENT = 10.00; const double MINIMUM_PAYMENT_PERCENT = 0.10; …

Member Avatar for bandit711
0
133
Member Avatar for pistol-pete

This is a conceptual question to help with a program I am developing. It takes two lists from a file and compares them in parallel to see if they are anagrams. My question is how do I store these strings in a one dimensional array mapped to ASCII codes. I …

Member Avatar for jonsca
0
193
Member Avatar for pranay_agg

hi , i am having difficulty in implementing the basic mathematic principle of inclusion-exclusion. I want to find the no. of numbers in a range from 1 to N which are divisible by another set of numbers where size of set <= 15. Now the problem i am facing is …

Member Avatar for schaub1st
0
546
Member Avatar for cidalan

hello guys, i want to know how to write a program that can read txt file. example like this, ClassAttendance1.txt and ClassAttendance1.txt contained Student ID number and name. i want to write a program that if i run the program will detect all ClassAttendance .txt and make a summary in …

Member Avatar for cidalan
0
84
Member Avatar for rizzi143

int *p; int *q; p = new int; *p = 35; q = new int; *q = 62; p = q; cout << *p << ", " << *q << endl; answers : a. 35, 35 c. 35, 62 b.62, 62 d.62, 35

Member Avatar for bsdbum
0
83
Member Avatar for Someguynamedpie

I'm making a library for myself, and I keep getting that error :( Pib.h: [code=cpp] #pragma once #include "stdafx.h" #include <iostream> #include <string> using namespace std; class Pib{ public: void echo (int Text); void test(void); }; void Pib::echo(int Text){ printf("Haha: "+Text); }; void Pib::test(void){ cout<<"Text"; }; [/code] Main File: [code=cpp] …

Member Avatar for mrnutty
0
848
Member Avatar for NitaB

I see this topic has been hacked to death but it seems to be slightly different in each case. Anyway, I've been chopping away at this code for awhile. I realize that it is easier to overload the () rather than the [] which is what I was determined to …

Member Avatar for NitaB
0
182
Member Avatar for dude1

hi, sorry for the newb questions, ive got this part of a assignment its instructions are: "Define a class called Clock -it has a single, private, data member of type unsigned long called secs -it has these four public interface methods plus necessary constructors setClock() accepts nothing, returns nothing - …

Member Avatar for dude1
0
113
Member Avatar for n21115

Hi everyone. This is my first post here at DW. I was just experimenting with programs and thus I am trying to implement [B]Bisection Method[/B] & [B]False Position / Regula Falsi Method[/B] into a C++ program. Once I am done doing these two, ill start coding the [B]Newton-Raphson Method[/B]. All …

Member Avatar for _Set
0
1K
Member Avatar for bananasplitkids

Im getting the wrong output. In my while loop for the else statement I want it to perform the subtraction operation and then put that data on the queue pq2. I put a cout statement to make sure that the data is on the pq2 queue. However Im getting weird …

Member Avatar for bananasplitkids
0
113
Member Avatar for mathpro

Hi, I am working on a C++ select algorithm using the qsort function. I am suppose to first sort the array and then return the i-th smallest value, which is given by the stat value. However, I have no idea how to return the value from a void array. I …

Member Avatar for some
0
195
Member Avatar for max.v8

Hello guys, this is my first time in these forums, so I apologize for my bad English. Well, here's the problem: I need to get the frequency of integer numbers that are stored in a file, their range is from 0 to 100, their amount is unknown and depends on …

Member Avatar for max.v8
0
175
Member Avatar for monjed

i need a program that reads a paragraph of 6 lines of text. The user can enter extra spaces between words. The length of each line does not exceed 80 characters. The program should output the following: 1. The input paragraph without extra spaces between words 2. Average word length …

Member Avatar for monjed
0
113
Member Avatar for zavidovych

Hi gurus, here comes the problem: N ambassadors discuss serious business at the circular table. Each ambassador`s attitudes towards other ones are described as N-1 float numbers between -1 and 1 (from hatred to love). Atmosphere between two neighbors equals the average of their mutual attitudes e.g. Amb1 likes Amb2 …

0
31
Member Avatar for caribedude

I've been trying to make a program that can read some information from a file and store it in memory to compare with user input. It's sort of a quiz with organic synthesis. A synthesis is dived into steps so I chose to make a synthesis a vector of vector …

Member Avatar for caribedude
0
100
Member Avatar for babalonas

How do I return to start (int main) in c++ example: int main() std::cout << "Haha, this is a loop"; (what will I type to make it go back to start and repeat itself??)

Member Avatar for mrnutty
0
48
Member Avatar for wesselnaude

Trying to write a very simple function that boxes in a hello world print out. I have been stuck here for hours now and would appreciate some help as the frustration is killing me. The print out should look like this. ////////////////////// / Hello World / / Hello World / …

Member Avatar for Ancient Dragon
0
97
Member Avatar for gastonci

very simple, is there any speed or memory diference beetwen this two whiles? [CODE] int x = 0, y = 0; while(x < size) { y++; array[x] = array[y]; x++; } [/CODE] and [CODE] int x = 0; while(x < size) { array[x] = array[x++]; } [/CODE]

Member Avatar for gastonci
0
82
Member Avatar for group256

Hi everyone, I'm writing a code to get local ip address and send it to a server. I'm doing [B]socket programming[/B] and I'm trying to get Ip address of my machine, and send it to socket server. In other words, Let's say my ip address (which is the client), is …

0
74
Member Avatar for ladies5235

can anyone help me with my assignment about sequential access file?? i have attach 2 file..its about my assignment question..

Member Avatar for ladies5235
-2
131

The End.