48,986 Topics
| |
Hi! :) I've been given a task in which I have to code a C++ program where an encryption key string with a length of 26 small alphabet is asked, then the user must input a word to encrypt and then it shows the encrypted word. If the encryption key … | |
Hi, I'm getting segmentation fault errors when I use quicksort with ~350 000+ numbers. This is the quick sort algorithm I'm using: [CODE]void swap(int* v, int i, int j) { int tmp = v[i]; v[i] = v[j]; v[j] = tmp; } int partition(int *v, int s, int e) { int … | |
Hi. I'm sure this question has been asked before, but I can't get the text searched for. If anyone can explain them, refer me to an article, or give me the correct search query I would appreciate it. Thanks. | |
bool operator >(Counter & rhs) { } bool operator ==(Counter & rhs) { } bool operator !=(Counter & rhs) | |
Ok I just need an idea or a source code to start my project. I need to read a text file with fstream or any other thing. This will be my txt file (nothing the same, just an example) [CODE]a = 6 b = 3 c = 7 a - … | |
Hello, I'm trying to compile my client, For a video game. But I get this error [CODE]c:\drsource stuff\46022362clientlatest\clientlatest\filemgr.h(18) : error C2275: 'std::iterator' : illegal use of this type as an expression [/CODE] [CODE]{ typedef map<int, T*> hash; typedef map<int, int> check; typedef map<int, T*>::iterator index;[/CODE] And here is another one … | |
I have already downloaded the latest DX SDK (June 2010) and still, this error remains. error C2065: 'IID_IDirect3D3' : undeclared identifier I already included the headers below but it seems not to work, what am I missing? #include <d3d9.h> #include <ddraw.h> | |
I am trying to get my code below to display what high school the students are from from the .txt file the text file below will work but i want to add school to txt file and confused on what to change in my code [QUOTE]Alphy Beta 85 83 77 … | |
Consider the following selection statement where X is an integer test score between 0 and 100 Declare X as an integer Write “Please enter a number between 0 and 100.” Input X If (0 <= X and X < 49) Write "You fail" Else If (50 <= X and X … | |
SOrry guys to disturb you all... I just need a little help , can some one please give me a brief introduction to pointer... also i have some question, what does these mean [code] int i; cout<<i (mean to print i) cout<<*i (what does it mean) cout<<**i (what does this … | |
I'm using DevC++ with the allegro library Everytime I try to run my program I always get an error saying "alleg42.dll is not found"? What am I doing wrong? | |
Who will spend little time to Create a guide about [code] HWND hw = CreateWindowEx( params ) [/code] in C/C++ That i want is a guide were you will have examples for all controls (Ritchtb, tb, button, tree, nodes, Listview, contextmenu, toolstrip menu, label... etc) PS: as i know CreateWindowEx … | |
I am trying to create a vector of objects that can have pointers to functions. I would appreciate some help with this as I don't really know what to do [CODE]#include <stdlib.h> #include <windows.h> #include <ctime> #include <cstdlib> #include <iostream> #include <vector> #include <string> using namespace std; class Card { … | |
Hey everyone, Anyone know if Solaris, by default, throws an out of memory exception when 'new' is called but the system has run out of memory? I know Windows systems has this turned on by default, and AIX doesn't. But I can't find anything related to Solaris. | |
[CODE=c++]#include<iostream> #include<fstream> #include<string> #include<ctime> #include<conio.h> using namespace std; class log_on{ public: void displaylogtime(); }; void log_on::displaylogtime(){ char d [9]; char w [9]; _strdate(d); _strtime(w); cout<<"\nThe current time :"<<w; cout<<"\nThe current Date :"<<d; } class clothes_selector{ string happy; string sick; string confused; string sexy; string grumpy; string winter; string summer; string … | |
[COLOR="Red"][B]this is what compiler shows[/B][/COLOR] tree.cpp: In member function ‘void redblacktree<T>::insert(T) [with T = int]’: tree.cpp:187:12: instantiated from here tree.cpp:103:9: error: lvalue required as left operand of assignment tree.cpp:140:9: error: lvalue required as left operand of assignment [COLOR="Red"][B]if u don't want 2 go thru' d code then kindly just tell … | |
it's classic traveling salesman problem using dynamic programming. the peseudocode is given : Inputs: a weighted, directed graph, and n, the number of vertices in the graph. The graph is represented by a two-dimensional array W, which has both its rows and columns indexed from 1 to n, where W … | |
Hi, I'll preface this by saying I am about as beginner as it gets (the "installed compiler on saturday, open first book saturday night" kind of beginner) Basically, I have a small program that reads the current directory for any file with ".txt" and then opens and scans those files … | |
So i was in a making of my homework where im supposed to write a program to write (output) 2 tables to .txt file 1) given data 2) calculations that were done with that data. heres the code [CODE] /* L3-7. Turime tekstiniame faile studentų apskaitos sąrašą: pavardė, vardas, įstojimo … | |
Hi, Good day. I want to get the attributes of an xml using libxml2 and save it to a stl map in c++? Can someone help me? tnx. | |
I know it is possible my bootmanager's installer nagged me abou it. How do I tell what bitness and mode it is I ? (ex: 16bit real mode,16bit protected mode, 32bi protected mode, 64bit long mode, ect) | |
I am trying to make a program to add, delete, and print a sorted linked list. I have tried many different things and now I am getting a Segmentation Fault so I was wondering what I am doing wrong? Here is my code so far: [CODE]//ItemType.cxx #include "ItemType.h" ItemType::ItemType() { … | |
I am trying to find the way to generate bezier curve using de casteljau algorithm for one of my assignment here. I am able to generate bezier curve using normal method but unable to start on generating using the above algorithm. It will be of great help if someone can … | |
Hello All, I am having a problem making my program display and output correctly. When i run my program my count will display but my word will just give me some kind of line. Can you please help me correct this? Thanks Ronnie [CODE] #include <iostream> #include <string> #include <iomanip> … | |
Is it possible to define a union at creation. ie: [CODE]union Colour { unsigned int i; char c[4]; struct{ char a; char r; char g; char b; }col; }Black(0xFF000000),White(0xFFFFFFFF),Red(0xFFFF0000),Green(0xFF00FF00),Blue(0xFF0000FF)/*etc...*/;[/CODE] | |
Hey everyone, I need help creating a program that will add and multiply polynomials using linked lists. The polynomials that will be added and multiplied by my program are taken from an input file. This file contains the polynomials in the form: 3 2 5 1 3 0 XXX 2 … | |
Hi everyone, I'm trying to code a calculator that performs the following operations: +, -, /, *, %, ^, !, L ! factorial = x! L log10= log10(x) and im having trouble running the code because of the last three functions. I will post my code and I hope to … | |
Write a C++ program using DarkGDK with functions that asks the user for a positive integer no greater than 15. The program should then display a square on the screen using the character “X”. The number entered by the user will be the length of each side of the square. … | |
hello, I want to use this code1 [CODE]#include <windows.h> #include <tchar.h> #include <stdio.h> TCHAR* envVarStrings[] = { TEXT("OS = %OS%"), TEXT("PATH = %PATH%"), TEXT("HOMEPATH = %HOMEPATH%"), TEXT("TEMP = %TEMP%") }; #define ENV_VAR_STRING_COUNT (sizeof(envVarStrings)/sizeof(TCHAR*)) #define INFO_BUFFER_SIZE 32767 void printError( TCHAR* msg ); void main( ) { DWORD i; TCHAR infoBuf[INFO_BUFFER_SIZE]; DWORD … | |
Hello first off I appologize if this is posted in the wrong forum and I'm sure if it is a moderator will kindly move it to the correct location. I did try to find a suitable place and this seemed the most logical choice to me, I did also try … |
The End.