49,766 Topics
![]() | |
Like there are authorities like sun which maintains java documentations, python.org which maintains python docs and for others where the developer of the language reference also maintains the documentations of the library and language reference documentations. What is the authoritative entity that maintains the complete c/c++ documentations? I was looking … | |
hi , i have a function parameter that i need it to be a char and also a const char* . can anyone help me? [CODE] void write(...) // ??? { } //.............................. if(somethin) { write('c'); } else write("string"); [/CODE] | |
So I am creating a Lockerz program using Visual C++. I have created a few buttons and the web browser thing. It all works great. Accept, when it gets to a page that play a video, I get this error: [CODE]An error occurred in a script on this page Line: … | |
c++ program that convert integer in to hexadecimal | |
| |
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 … | |
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 … | |
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]; … | |
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 … | |
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 … | |
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 | |
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] … | |
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, … | |
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] | |
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: … | |
[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; … | |
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 … | |
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 … | |
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 … | |
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 | |
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] … | |
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 … | |
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 - … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.