49,761 Topics

Member Avatar for
Member Avatar for danbyo1990

Hey Guys, I found an interesting website that has a tutorial for Genetic Algorithm. Here is the article: [url]http://www.realintelligence.net/tut_genetic[/url] This is the code of its author. I can combine, but there are an errors that I can't fix it. Anyone could help me to fix this. Here is the code …

0
63
Member Avatar for PapaGeek

I need to be able to call some very old C functions from a form application. What I found on line was to use 'extern "C"' to let Visual Studio know how to handle the calling parameters. But I'm getting a compiler error and not sure where it is coming …

Member Avatar for PapaGeek
0
1K
Member Avatar for wmurrow

Hey all. I'm trying to get the FindDaysOver function to grab the avg result from the CalcAvg function result in main. What am I doing wrong? Any help would be appreciated! [CODE] #include<iostream> #include <iomanip> using namespace std; double FindMax(double [], int); double FindMin(double [], int); double CalcAvg(double [], int); …

Member Avatar for WaltP
0
144
Member Avatar for MrEARTHSHAcKER

Hi, I wondered if it was possible to declare the friends of class but out of it? Like this: You have created class: [CODE]class myclass{ int x; public: bla bla bla };[/CODE] And instead of this: [CODE]class myclass{ int x; public: bla bla bla friend class someclass; };[/CODE] If it …

Member Avatar for MrEARTHSHAcKER
0
3K
Member Avatar for kcp

I just recently started learning C++, in the book i am learning from there is a problem that asks you to write a simple pasword program. It just asks the user the password and then displays a message wether its right or wrong after they enter it. I am having …

Member Avatar for WaltP
0
336
Member Avatar for xsharpx

I've been playing around with this for a while and just can't seem to get it right. Any help is appreciated! [CODE]string catalog[][] = { {"item1 - 0 dollar(s) each","description1"}, {"item2 - 3 dollar(s) each","description2"}, {"item3 - 5 dollar(s) each","description3"}, {"item4 - 7 dollar(s) each","description4"}, {"item5 - 9 dollar(s) each","description5"} …

Member Avatar for amt007kmr
0
108
Member Avatar for existence19

Hi I have to create a hash map with key as string and data as string. i have to create a custom hash function for the hash map, but i don't know how to do that.. can somebody explain and give an example from which i could understand?

Member Avatar for vijayan121
0
817
Member Avatar for BoBok2002

Hi, This is my first project involving processes I am completely lost. I need to create 10 processes that run at the same time. I know that a process is a program in execution so I must write a program that executes 10 times. I used Win32 API to create …

Member Avatar for vijayan121
0
3K
Member Avatar for nadavr

Hello, I've received an homework assignment to create an array via linked list. All went well until the compilation part where i get continuous errors. Seems most of the problem is that certain classes (DSA_array) doesn't recognize the existence of other classes and their member functions (DSA_list). Here's my code …

Member Avatar for Fbody
0
124
Member Avatar for Eldyvoon

let say I hv a row of text 'date' 'amount1' & 'amount2'.. by using ifstream I able to read a file, but how about I want to read the 3rd data? use seek?

Member Avatar for Eldyvoon
0
268
Member Avatar for roshan_iiita

Does learning OpenCL requires knowledge about Parallel Computing ?

0
65
Member Avatar for alexander1s

the program should have a getData function that accepts the total rainfall for each of the 12 months from the user, and stores it in a double array. It should also have four value-returning functions that compute and return to main the totalRainfall, averageRainfall, driestMonth, and wettestMonth. The last two …

Member Avatar for VernonDozier
0
136
Member Avatar for borchu

Hello everyone, I am trying to manipulate "DYNAMIC ARRAY" Structures however I've been faced with problems wanting adding new value. Here my code:: -I use CodeBlocks and gnu gcc compiler ^ also I checked it on linux machine. [CODE] #include <iostream> using namespace std; #include "Deneme.h" Deneme::Deneme() { countReg = …

Member Avatar for borchu
0
272
Member Avatar for Vasthor

what I mean is from this code, when coder doesn't put any curly bracket({,}), what does the while loop scope will cover? already test with random bracket put on the code, but, the only "brackected code" that work the same as the original code is when I put around words.push_back(word); …

Member Avatar for Vasthor
0
160
Member Avatar for doomsday1216

Hi-- I am new to C++ and am having trouble with this program: The objective is to take input from a file and write it to output, using the '|' character as the delimiter, but displaying it using a comma (ex, if line 1 is "1000|6 1 6 5 3 …

Member Avatar for WaltP
0
169
Member Avatar for happikoto

Though I would be able to figure this out but for some reason my if statements are just not working. What I'm trying to do is date validation. I call this function passing in day, month, year. The issue I'm having the the if statement. I can't seem to get …

Member Avatar for WaltP
0
194
Member Avatar for jefgreen

[CODE] #include <cstdlib> #include <iostream> #include <string> using namespace std; bool checkleap(int year); int main(int argc, char *argv[]) {string s1; int year,month,day,inbetween,dayspassed; char dash1,dash2; s1="Today is day number: "; bool leapcheck; leapcheck=checkleap(year); cout<<"Enter a date, in the form of MM-DD-YYYY: "<<endl; cin>>month>>dash1>>day>>dash2>>year; switch (month) {case 1: 31-day=inbetween; [COLOR="green"]//Line 19[/COLOR] 31-inbetween=dayspassed; …

Member Avatar for mzimmers
0
181
Member Avatar for UNDER-18 FG

Hey, everyone~ Being the second time posting here, I'll try to make it simple but clearly as possible :) So, my assignment this time is about writing a C program to print the following star patterns: [CODE] * * * * * * * * * * [/CODE] So, here …

Member Avatar for mrnutty
0
329
Member Avatar for Chuckleluck

I'm beginning game development, and I started by reading Michael Morrison's [I]Beginning Game Programming[/I], which teaches how to develop a game in C++ using the Win32 API. I've had a lot of trouble with things I don't have any experience in (when I shut down my program, the process still …

Member Avatar for mrnutty
0
499
Member Avatar for phorce

Hello, I'm working on a project where certain characters can have multiple values.. E.g. Letter 'A' can be replaced with 'B', 'C', 'D' Letter 'S' can be replaced with 'X', 'Y' And then it would output it like this: A can be replaced with B - Yes/No A can be …

Member Avatar for NathanOliver
0
88
Member Avatar for Dakot

hello , i want to cin n numbers then to sort the positive numbers in one array, the negative numbers in another array , then to print positive array. So let me explain , i run the program , i enter the 9 , then enter 1 2 3 4 …

Member Avatar for Dakot
0
153
Member Avatar for ankit.4aug

[CODE] #include<stdio.h> int main() { int arr[2][2][2] = {10, 2, 3, 4, 5, 6, 7, 8}; int *p, *q; p = &arr[1][1][1]; q = (int*) arr; printf("%d, %d\n", *p, *q); return 0; } [/CODE]

Member Avatar for ankit.4aug
0
91
Member Avatar for sachin mali

my project Converting the c++ program to C# program.what i do plece sugs me and help me

Member Avatar for hericles
0
43
Member Avatar for az.rathore

can any one write code to find out if array is sorted in ascending order from even to odd number or not ? i will be thankful . i am new self learner of c++. Thanks in ADVANCE

Member Avatar for WaltP
0
1K
Member Avatar for essentialc++33

The value for PI can be determined by the series equation PI=4x(1-1/3+1/5-1/7+1/9-1/11+1/13-....) write an interactive program that asks the user how manu terms of series equation to use in approximating PI. Then calculate and display the approximation. Here is a sample run: PI Approximation Program How many terms of the …

Member Avatar for raptr_dflo
1
4K
Member Avatar for shouvik

Hi people. well after I started learning C++ I thought why not try out my skills in some programming so I made my first programme. It is a very basic game commonly known as "HANGMAN" to many. It still might have some errors but it works. Hope you can modify …

Member Avatar for raptr_dflo
0
547
Member Avatar for az.rathore

hi i am new to c++ i have problem to solve kindly help me Start with any positive number n. If n is even divide it by 2, if n is odd multiply by 3 and add 1. Repeat until n becomes 1.For example sequence that starts at n = …

Member Avatar for raptr_dflo
0
209
Member Avatar for vishwanath.m

Guys, i have a problem in insert a string in to a vector.To be clear enough i have insert "vishwanath" into a vector can any1 help...

Member Avatar for raptr_dflo
0
174
Member Avatar for FragSax

I'm having a small problem with a map format that I'm making. It's essentially simple a char*[32] with each line of characters being stored in it for instance here's a hard coded version of the map and how I'm storing it: [CODE]int main () { char *mapdata[32]; mapdata[0] = "1111111111111111111111111111111"; …

0
43
Member Avatar for sita12345

Having assertion failure while deleting an element from a vector.What are the causes of assertion failure?

Member Avatar for sita12345
0
343

The End.