49,761 Topics

Member Avatar for
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
677
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
203
Member Avatar for rchris2121

[CODE]#include <stdio.h> #include <ctype.h> int isPalindrome( char *str, int length ) { if ( length < 1 ) { return 1; /* no more chars to compare, its a palindrome */ } if ( str[0] == str[length-1] ) /* Are the two ends same? */ { return isPalindrome( str+1, length-2 …

Member Avatar for WaltP
0
163
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
215
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
447
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
211
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
734
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
401
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
259
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
Member Avatar for bennetk2

I am having problem with converting and initializing errors. Any help is appreciated. I am a 2 yr Computer Science major, so be gentle. Here is Code: Sorry its long! [CODE]// Kyle Bennett // CS 318 // Paint Throwing Disturbance #include <iostream> #include <iomanip> // set width and decimal #include …

Member Avatar for raptr_dflo
0
370
Member Avatar for pseudorandom21

Windows API Can the KEYBDINPUT structure in the INPUT structure be used to send a mouse click? I know there is a different structure for the mouse but I would like to use the KEYBDINPUT structure if possible.

Member Avatar for ret801
0
162
Member Avatar for -Theo-

i was working on a project to send sms through my cellphone connected to my usb, but i did it on java with the comm library and on windows, now im working on ubuntu with c++, but i dont find any library that i could use to communicate with the …

Member Avatar for ret801
0
51
Member Avatar for triumphost

I have a game client that has a button to allow input and when toggled on it will block input.. Thing is sometimes even when u toggle it off, it still blocks user input.. Other times there is an extremely HUGE delay before it accepts input.. I was thinking if …

Member Avatar for ret801
0
220
Member Avatar for myrongainz

My teacher showed me something like this with functions but I don't quiet get it. Since, I can't ask him right now...I came here for help. I'm suppose to write a function to display days in a month. This is my first time using functions so all the help I …

Member Avatar for myrongainz
0
162
Member Avatar for Aghtar

Hello guys. I just have a problem that I think you pros will help me solve real quick.. I was instructed to make a table that will show the inputed miles, yards, feet, and inches this way: Units Value Meters Miles XXX XXX.XX Yards XXX XXX.XX Feet XXX XXX.XX Inches …

Member Avatar for Aghtar
0
169
Member Avatar for earth_observer

Hello everybody! I build a string for a system call (Matlab) like: [CODE]std::string command = "matlab -nosplash -r MyMatlabScript(" + arg1 + " " + arg2 + ");";[/CODE] The system call is: [CODE]system(command.c_str());[/CODE] However, i get an error, pointing to the first parentheses in my command string. How can i …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Boeing

How would I write a program that writes the text in a textbox to a List Box when a button is pressed, kind of like an address book?

Member Avatar for Boeing
0
162
Member Avatar for Knar

Ey all. Im folowing a c++ course and im stuck writing string or char arrays to matrices. The problem is i have a matrix of size [i][j] with random values from 0 to 3. Each of these values have to correspond to either a string or char array. 0=EMPTY 1=RES …

Member Avatar for Greywolf333
0
420
Member Avatar for k_arjun

Hi, I am a newbie to coding. I am trying to implement a graph in the following format. User input: v1 v2 edge_cost 1 3 10 1 2 20 2 3 40 3 1 30 I am storing the graph as an adjacency list, so that the output should be …

Member Avatar for k_arjun
0
872
Member Avatar for nchy13

i have included just insert function in redblacktree class. there are[U] no compilation errors but it shows [COLOR="Red"]segmentation fault[/COLOR] [/U]on running. when i am calling insert function [B]it's not even entering into it as it's not printing the cout statement [/B]at first line of insert body. i am using g++ …

Member Avatar for Moschops
0
169
Member Avatar for Warhead88

Hi, Can anyone show me or point toward a link with a decent example of a hash table using linked list. Thank you ,

Member Avatar for Warhead88
0
329
Member Avatar for yurigagarin

Hi guys, I have this input.txt file and I have to scan it to get information for my project. the input.txt file has format as: 33 56 34.8 N 118 24 30.1 W 37 40 23.5 S 144 50 54.1 E So I used fscanf_s to scan the file. Here …

Member Avatar for yurigagarin
0
1K
Member Avatar for babyhuyx

[CODE]#include <iostream> #include <Windows.h> #include <time.h> #include <iomanip> #include <string> #include <cctype> #include <algorithm> using namespace std; /*********Wallet*****************/ void blingstack(double& wallet, double& winnings, double& payoff) { if(payoff > 0) cout<< "You won $ " << winnings * payoff <<endl; wallet = wallet + (winnings * payoff); cout<<"\nYour current balance is …

Member Avatar for WaltP
0
169
Member Avatar for Awais Ali

I want to create a key in the [B]Registry Editor[/B] of Windows XP using c++ program. After this i am to write the Name and the Data(e.g value) of that particular key using c++ program. And i am to read the Name and Data(Value) of that particular key using c++ …

Member Avatar for Awais Ali
0
161

The End.