49,761 Topics

Member Avatar for
Member Avatar for khayabi

Hai guys, I am a newbie here, maybe you know about my problem. this is VB source code : [COLOR="Red"][B]ReDim[/B][/COLOR] parent.Individuals(maxPop) As Individual [COLOR="Red"][B]ReDim[/B][/COLOR] offspring.Individuals(maxPop) As Individual Do While bil < maxPop bil_gen = 0 [COLOR="Red"][B]ReDim[/B][/COLOR] parent.Individuals(bil).Gen(batas_gen) As Genetik parent.Individuals(bil).Genome = AssignValue(1) List3.AddItem parent.Individuals(bil).Genome bil = bil + 1 Loop …

Member Avatar for WaltP
0
119
Member Avatar for Khoanyneosr

[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); void game(); // Types and Arrays string choice; string inst; int main() { welcome(); return 0; } void welcome() { cout << "\tWelcome to Hangman …

Member Avatar for Narue
0
231
Member Avatar for HASHMI007

#include<iostream.h> struct rectInfo{ float height ; float width; float area; float perimeter; }; /* write a function void gendata(rectInfo * r)to generate and assing values to the height and width member of r(value should be b\w 1 - 20 )*/ void gendata(rectInfo * r) { }

Member Avatar for jonsca
0
89
Member Avatar for JordanHam

[CODE]#define _LL_BUFFSIZE_ 2048 string lastLine; lastLine.clear(); // regardless, zero out our return string char buff[_LL_BUFFSIZE_]; // our temporary input buffer data_filet.seekg (0, ios::end); // go to end of file int length = data_filet.tellg(); // find out how large it is data_filet.seekg(length-min(length,_LL_BUFFSIZE_),ios::beg); // seek back from end a short ways // …

Member Avatar for JordanHam
0
4K
Member Avatar for flyboy567

Hey, Im having some trouble with my code, it doesn't seem to stop to wait for an answer to the question about modifying the phone list when i input values in above and press Ctrl Z enter, however the code works fine when i remove the code about inputting information. …

Member Avatar for Fbody
0
1K
Member Avatar for margeaux54

I have a problem that ı could not understand. [CODE]#include <cstdlib> #include <iostream> #include <stdio.h> using namespace std; struct record { char name [20]; double ave; }; int main(void) { int x,y; struct record array1[3]; struct record array2[3]; FILE *a; a=fopen("in.txt","r"); for (int i=0;i<3;i++) { fscanf(a," %d",&y); array1[i].ave=(x+y)/2.0; cout << …

Member Avatar for caut_baia
0
81
Member Avatar for yuugib

Hi, I was wondering if you can help me figure how to go about this problem. This is what I have to do: Write a programme to generate an array of 100 random integers. [B]While the array is being filled incrementally, produce a sorted array by comparing the new element …

Member Avatar for yuugib
0
212
Member Avatar for Hojjat.Mojallal

There are n persons numbered from 0 to n - 1 standing in a circle. The person number k, counting from the person number 0, is executed. After that the person number k of the remaining persons is executed, counting from the person after the last executed one. The process …

Member Avatar for Hojjat.Mojallal
0
374
Member Avatar for az_ez

Hi, I've been working on this code but recently there's been a problem with a section of my code, this being that there was a stack overload but now, the code just stays in a loop saying that there is an invald arguement. I don't know how to get it …

Member Avatar for az_ez
0
358
Member Avatar for bkoper16

I am doing a project for school that requires me to make a program that asks the user to enter a date by selecting two options for the format 1.MM/DD/YY (in numbers) 2.Month ,DD, YY (with the name of the month entered) both options should then display the date in …

Member Avatar for thelamb
0
174
Member Avatar for rohitamitpathak

i m confused about sprint syntax- i need to create dynamic mysql query so i have to use it, when i take char * it shows a error while when i take char arr[100] (like this )it work fine.. i read syntax from sprint from multiple sites, and it make …

Member Avatar for rohitamitpathak
0
268
Member Avatar for mpassaglia

Hello DaniWeb! I've been struggling with a small detail of this program for a few days now, and haven't come up with any solutions on my own. The basic gist of the assignment is to fill an array with random numbers, sort it, and then search for a number in …

Member Avatar for mpassaglia
0
405
Member Avatar for subith86

Hi friends, I know this is such a freak code, but out of curiosity I did it to see memory usage increase using new operator. [CODE]int main() { char* a; for (;;) { //cout<<&a<<endl; a = new char[10]; } }[/CODE] As you see line7 is commented. When i run this …

Member Avatar for subith86
0
145
Member Avatar for ronthedon

I have a program where I have to put an input file in. Can someone tell me which direction to go in to where i can have my program calculate the data from the input file?

Member Avatar for frogboy77
0
50
Member Avatar for lxXTaCoXxl

Okay so I know practically nothing about creating mathematical applications in C++ but am trying to learn. Practically everything I search for isn't anything close to what I need. Basically, I need to lean how to make a calculator style app first before continuing on, however I can't find anyone …

Member Avatar for pseudorandom21
0
252
Member Avatar for mpike

Ok! so im making a simple highscore type thing. the person plays the game and receives a score within the game. At the end of the game i have it currently comparing the score received with the score already in place within the highscore text file. the problem im having …

Member Avatar for arkoenig
0
150
Member Avatar for manutd

This is a function that will find the factors of a given number for you. EDIT: Better algorithm using vectors (thanks all at cprog :) )

Member Avatar for lxXTaCoXxl
0
178
Member Avatar for programing

hi . plz I need you to explain for me how i can write a function that return the mod of array with n value . i think mod is that sample mode is it ? i am try to solve . but my code print the number taht is …

Member Avatar for WaltP
0
2K
Member Avatar for Gryphon75

Hello everyone, this is my first post. I am working on a school assignment and I am stuck. The assignment involves reading a file that contains course subjects and the maximum number of students that can take the class. The contents are entered into an array sorted alphabetically by the …

0
38
Member Avatar for Michael_Tanner

I've been snooping around trying to figure whether or not this was completely safe. I've noticed that if you were to simply "delete this" you might have occurrences where the deleted pointer is still in use elsewhere in the program. To prevent this, you'd need to dereference it and perform …

Member Avatar for Michael_Tanner
0
147
Member Avatar for bantex07

Please Help how can i delete a lines from may .txt file someone help me :D my .txt file had a data please so body help me :D:-/

Member Avatar for jonsca
-1
61
Member Avatar for nory22

hi there am wondering about the space between the [COLOR="red"]"[/COLOR] and the [COLOR="red"]%[/COLOR] scanf([COLOR="red"]"[/COLOR] [COLOR="red"]%[/COLOR]c",&choice); what's the different if i leave no space?

Member Avatar for Narue
0
135
Member Avatar for LevyDee

I am writing an importer for a custom export script to load mesh information for models. I tested my algo with small files, 20-30 kb of information with success, but when I try something bigger like 400kb(not that big mind you), the file fails to open. This is the significant …

Member Avatar for Kanoisa
0
145
Member Avatar for ntrncx

ok lets say that we have the numbers 5,67 and 128 (the numbers are randomly entered) i want in first loop read the last digit means 5,7,8 in the 2nd pass i want the tenths so will be 0,6,2 in the 3rd will be 0,0,1 and so on. what i …

Member Avatar for ntrncx
0
206
Member Avatar for Szeth

Hello, I have this on going project for my C++ class, dealing with a random number generator guessing game. I'm on the last step, finally. I gotta add functionality to output the array of guesses to a file after the answer has been guessed, and I need to include exception …

Member Avatar for Szeth
0
215
Member Avatar for narlapavan

first i am creating socket, with that socket descriptor i am sending some no. of bytes through sendto(....) function. At the time of receiving through recvfrom(....) function, my code was hanging if the specified destination address is not available. Suppose if destination is available the it's working correctly... Why this …

Member Avatar for dkalita
0
220
Member Avatar for UltimateKnight

Hey. As you know I'm a newbie in C++ and I'm learning from some source codes and eBooks. I don't know if the problem is to me but when I try to compile the code an error shows. I don't know if I should copy this code but I read …

Member Avatar for UltimateKnight
0
328
Member Avatar for az_ez

I've been trying the last few days to get this code to work but it still wont return the exact numbers. Its always atleast like 10 characters off and it probably is a trivial answer but I cant find the solution. I've initialized the charCount to 0 but still it …

Member Avatar for WaltP
0
134
Member Avatar for Igor Vinícius

Hello World, I'm a c++ beginner and i've diced to study. So this is my first code: [CODE] #include <iostream> using namespace std; double d = 2.2; int i = 7; void some_function() { d = d + i; i = d * i; printf("%d\n", d); printf("%d\n", i); } int …

Member Avatar for Igor Vinícius
0
155
Member Avatar for taumang

i want to know the sequence of values tobe printed out by this algorithm count = 0 while(count<2) print the value of x x=x+2 else print the value of x my answers are as follows 0;2 i need clarity

Member Avatar for taumang
0
107

The End.