48,986 Topics

Member Avatar for
Member Avatar for mikkey91

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 …

Member Avatar for raptr_dflo
0
213
Member Avatar for fox196

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 …

Member Avatar for raptr_dflo
0
1K
Member Avatar for SoftwareGuy

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.

Member Avatar for SoftwareGuy
0
221
Member Avatar for johnnyboyslim
Member Avatar for johnnyboyslim
0
105
Member Avatar for aFg3

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 - …

Member Avatar for Narue
0
189
Member Avatar for eriger777

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 …

Member Avatar for raptr_dflo
0
362
Member Avatar for lelejau

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>

Member Avatar for lelejau
0
202
Member Avatar for cummings15

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 …

Member Avatar for raptr_dflo
0
147
Member Avatar for New4lyfe

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 …

Member Avatar for New4lyfe
0
183
Member Avatar for Majestics

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 …

Member Avatar for Narue
0
116
Member Avatar for TheChosen0ne

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?

Member Avatar for Ancient Dragon
0
69
Member Avatar for Panathinaikos22

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 …

Member Avatar for Ancient Dragon
0
166
Member Avatar for cypherscouter13

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 { …

Member Avatar for raptr_dflo
0
191
Member Avatar for Duki

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.

0
75
Member Avatar for #blessy#

[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 …

Member Avatar for MonsieurPointer
0
109
Member Avatar for nchy13

[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 …

Member Avatar for Narue
0
575
Member Avatar for conan19870619

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 …

Member Avatar for XDenasdc
0
671
Member Avatar for circles

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 …

Member Avatar for circles
0
202
Member Avatar for vlaskiz

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 …

Member Avatar for vlaskiz
0
213
Member Avatar for supershame

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.

Member Avatar for supershame
0
325
Member Avatar for Zssffssz

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)

0
63
Member Avatar for smmcfarl

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() { …

Member Avatar for raptr_dflo
0
438
Member Avatar for empyrean

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 …

Member Avatar for raptr_dflo
0
2K
Member Avatar for ronthedon

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> …

Member Avatar for vidit_X
0
205
Member Avatar for Labdabeta

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]

Member Avatar for Labdabeta
0
126
Member Avatar for maple123

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 …

Member Avatar for raptr_dflo
0
728
Member Avatar for Nawaf15

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 …

Member Avatar for raptr_dflo
0
399
Member Avatar for moni.

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. …

Member Avatar for moni.
0
98
Member Avatar for kv79

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 …

Member Avatar for raptr_dflo
0
255
Member Avatar for predator78

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 …

Member Avatar for ret801
0
133

The End.