51,593 Topics

Member Avatar for
Member Avatar for salem13

hi please I need help how to sort int line by line & get number of int in each line I have Input 4 2 32 8 6 10 7 9 21 2 3 14 1 5 Output must be 2 4 6 8 32 count = 5 2 3 …

Member Avatar for salem13
0
135
Member Avatar for mark5rockzz

I made a snake game using only its native language...I use the _getch() function to get whatever the user pressed and I used also the system("cls") to clear whenver the head of the snake moved. I actually made it move by the use of 2dim arrays but I have a …

0
53
Member Avatar for jonnyboy12

Hello all. I am working with windows forms in c++/cli. I am trying to use a tabpage control. When i have a background image behind my tabs, the tabs will flicker when i click on them. I have read about using this in my forms main constructor. [CODE] this->DoubleBuffered = …

Member Avatar for Milton Neal
0
136
Member Avatar for Zssffssz

I Want To Make A Utility Like The Old DOS Command "rdisk" In C++. The Things I Want It To Be Able To Do Are: WIN: Be Able To Specify The Drive Letter (Like rdisk's /:Z) UNIX: Be Able To Specify The Mount Point (/mnt/rdisk or /media/somthing, etc) BOTH: Make …

Member Avatar for Zssffssz
0
970
Member Avatar for meme meme

how can i check if the number is positive or not by using switch statement please who know the answer help me and answer the question

Member Avatar for Tygawr
0
141
Member Avatar for FALL3N

what I'm pretty sure I learned in school and what like every website said when I tried to look this up online was that the C++ code for generating a random number with floor: 1 and ceiling 100 (err I guess 101) is: [CODE]int number = rand() % 100 + …

Member Avatar for FALL3N
0
280
Member Avatar for michael10024

A black-hat cracker attacked to your computer and he took a very important sequence from it. Also, he replaced this sequence with five mutations of the sequence. The sequence has length of N and it's content are numbers between 1 and N (all the numbers one time) in a random …

0
49
Member Avatar for shadyreal

Hello! I have created a ChatClient in Visual C++ 2010 Express, cmd console only. Now I want to make it in Windows Form Application. I have come a long way but the thread function to start a new thread is a bit of a problem.. I get these errors: error …

Member Avatar for raptr_dflo
0
370
Member Avatar for butler273

This function of this find the median of three values inside an array. I was wondering if there's a more elegant solution to finding the median value between 3 values. [CODE] int mid =((p+r)/ 2); if(V[p]<V[r]){ if(V[p]<V[mid]){ if(V[mid]<V[r]) swapfunc(V[mid],V[r]); } else swapfunc(V[p],V[r]); } else{ if(V[r]<V[mid]){ if(V[p]<V[mid]) swapfunc(V[p],V[r]); else swapfunc(V[mid],V[r]); } …

Member Avatar for butler273
0
258
Member Avatar for NinjaTwinkie13

So I've currently been studying C++ independently for a couple weeks with the help of good old books. One of the exercises was to make a "games library" where you can see your list of games, add a title, or delete it (has nothing to do with games). The catch …

Member Avatar for NinjaTwinkie13
0
156
Member Avatar for www.daniweb.com
Member Avatar for thiemebr

Hi, I'm new in asp and c# and I've being looking everywhere on how to dynamically create multiple html tables based on a user input: e.g.: user enter 3 in a text box and right below 3 tables are created with other text boxes for more user input. Thanks

Member Avatar for thiemebr
0
176
Member Avatar for phatxkitty

i have had this problem for a fuew months.C:\Windowa\SysWoW64\ping.exe It useto crash my computer all the time i fixed that with the windows repair disk. Now it keeps poping up and kicking me off my games and web pages Im not really good with computers so if [B]anyone could help …

0
151
Member Avatar for maxel345

Hi everybody, I have a problem with Opencv. I have to recognize some object in a image. The problem these object is attached,tangent. So I tried a lot of solutions but nothing works fine. Here is my code: [CODE]... IplConvKernel * kernel = cvCreateStructuringElementEx(2,2,0,0,CV_SHAPE_RECT,0); IplConvKernel * kernel2 = cvCreateStructuringElementEx(3,3,0,0,CV_SHAPE_ELLIPSE,0); cvThreshold(image,image,80,255,0); …

0
46
Member Avatar for jumo1807

Hi, I am currently newbie in C++, I just learned it for around 2 weeks, My question is when I put the number, it shows if it's a prime number or not. The only problem when I put 2 and 3, it supposed to be prime numbers, but the fact …

Member Avatar for Lerner
0
136
Member Avatar for ambrishbhucs

Hello everyone, I wanted to implement AES encryption technique to encrypt text file of any size. but for large size my compiler crashes.could anyone solve my problem problem is in line 304 according to me I attached my code with this thread plz help me asap.

Member Avatar for Atomfried
0
22
Member Avatar for RonKevin

Hello guys, Ron here...im going to start my IT lessons next year but I already started learning some basics in C++...actually, I tried making a Hangman game already but there's something wrong...My loop is incorrect...please help me...so here is my first ever code.. #include<iostream.h> #include<conio.h> #include<stdio.h> #include<math.h> void main() {char …

Member Avatar for RonKevin
0
135
Member Avatar for Chuckleluck

Can someone give me some resources (books, online tutorials, etc.) on algorithms for 2D collision detection? I've searched a little, and all the ones I can find are for 3D collision detection. Thanks in advance. EDIT: Just to clarify, I know [I]how[/I] to do collision detection, just not efficiently.

Member Avatar for raptr_dflo
0
303
Member Avatar for Griff0527

I am getting an error during the build stating: "Illegal call of non-static member function" and I cannot figure out 1) what does this mean, or 2) how to resolve it. For detailed clarification, I will type out what the assignment was (I say was because the assignment was due …

Member Avatar for raptr_dflo
0
377
Member Avatar for naraayanan

Hi friends, I am new for C++. Please answer my questions [LIST=1] [*]How to write a Multiple COM Port at same time? Is it Possible?How? Please give a Code [/LIST] In My Program,I declared a Object like this [CODE] struct _DCB dcb; HANDLE hCom; [/CODE] [LIST=2] [*] What is mean …

0
58
Member Avatar for pendo826

[CODE]//Header file for Array.cpp. #ifndef ARRAY_H #define ARRAY_H template<class Datatype> class Array { private: //Template for use with the Array's data type. //Member Variables. int size; int grow_size; int num_elements; Datatype* m_array; public: //Constructor. Array( int p_size) { m_array = new Datatype[p_size]; size = p_size; } //Destructor. ~Array() { if( …

Member Avatar for raptr_dflo
0
188
Member Avatar for pushpat

Hi Folks :), I need your help:?:, I am getting segmentation fault for "delete bptr_1" ( please refer program written below and line number 46 ). If i remove statements "delete dptr;" (@line 32) inside try{}, then the program executes otherwise it will give error. Could you please tell me …

Member Avatar for pushpat
0
145
Member Avatar for Karkalash

Hello: How can I improve on my function template to also do insertion sort on strings? I'm afraid I'm very new to templates, any hints appreciated. Template looks like so: [CODE]template <class T> void insSort(T arr[], int size) { T key = arr[0]; int j = 0; for(int i = …

Member Avatar for Karkalash
0
1K
Member Avatar for dakerao

Hello I'm trying to read files of file extension .obj or .txt and for certain characters using boost iostreams How would I implement that using this current code as a basis [CODE] typedef ex::container_source<string> string_source; string input = "hello"; string output; io::stream<string_source> in(input); getline(in, output); assert(input == output); cout << …

Member Avatar for dakerao
0
174
Member Avatar for pattilupwned

Hello, I am just starting out in a basic C++ class and am having some trouble with this problem for class. Any help would be seriously appreciated. In the program, I have to use an input file that includes the name of a college, where the college is located, the …

Member Avatar for m4ster_r0shi
0
223
Member Avatar for HWK1982

hi everybody my problem is when i set timer for ftp to send me a file , the keylogger doesn't log or save any text in log file , i face this problem just when i set timer for ftp otherwise it work fine i mean without timer i set …

Member Avatar for triumphost
0
671
Member Avatar for Johnathon332

How does one simply make a mutator or setter for an array of strings? I have made a inspector or accessor but cant seem to figure out how to make a mutator. much appreciated.

Member Avatar for mike_2000_17
0
685
Member Avatar for triumphost

Is there anyway I can specialize JUST the Contains function of the class below? I tried for hours and cannot figure it out as I'm not too good at specialization but I learned templates recently. I want to do something like: [CODE] bool Contains(string ToFind) { //If typeof(T) == typeof(string) …

Member Avatar for mike_2000_17
0
618
Member Avatar for while(!success)

Hey guys, learning about multi-dimensional arrays and am tracing a code that my teacher gave us, but I'm failing to see or conceptualize it. for instance: Why does the following code output 3? [CODE] int a[2][4][2] = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; cout << a[1][2][1] << endl; //output is 3 [/CODE] How are the …

Member Avatar for while(!success)
0
300
Member Avatar for daldrome

Hey guys, I'm trying to get my code to compile. I have 3 files: a header file, a cpp file for my main function and another cpp file for my other functions. When I try to compile my cpp function file, I get the error Undefined reference to 'WinMain@16 and …

Member Avatar for kevenm
0
1K
Member Avatar for Swiftle

Hello I built a personal 2D array for my current project. I also store these arrays (called Matrix) in a std::vector. The matrices are 24*181 and currently I sue between 30 and 50 of them. I don't think project details are relevant however I'm getting 3 errors which I have …

Member Avatar for VernonDozier
0
210
Member Avatar for DNA_Monk

Hi all... I have been trying to read a huge file of size around 7 GB. It looks like impossible task now.. The file looks like this: [ICODE] CITY0_084989053<tab>hdewhiuewf CITY1_000989090<tab>AACGTACGT CITY1_000989090<tab>GTACGATAH CITY2_643274032<tab>kdijadadsail CITY3_004498906<tab>Adjbsajdada CITY3_004498906<tab>Adjbsajdada ...... [/ICODE] I expect an output like below with only duplicate left side records. [ICODE] CITY1_000989090#1<tab>AACGTACGT …

Member Avatar for histrungalot
0
157
Member Avatar for s.bolboli
0
51
Member Avatar for FraidaL

Is it possible to loop an if-else statement? How would such a thing be coded. Basically, this code allows the user to enter a value for a month. If it's not from 0-12 it asks the user to enter a new value. How could I get that to go through …

Member Avatar for Tygawr
0
395
Member Avatar for resell4

I bet most of you in here have seen the old movie "Wargames" Im wondering how would you go about programming an AI like WOPR that learns from itself? Lets take an example in chess *Which he loved* He would make simulations of a chess game, if he lost he …

Member Avatar for mike_2000_17
0
194
Member Avatar for CalNChibi784

Hello everyone. I'm a new member here but have an issue that I've searched and searched for and just cannot figure out how to resolve. Based off of the issues that I was able to correct, Daniweb seemed like the best place to ask. I'm making my first attempt to …

Member Avatar for CalNChibi784
0
255
Member Avatar for GuruGhulab

Hello there, okie, my problem today is i i have all this names, [CODE]John, Dave, Steve, Kevin,Andrew,Scott,Colin,Timothy,Zenon [/CODE] and i have to sort them using insertion sort, i can sort number using insertion sort with no probs, but when it comes to strings, and stuff, i get lots of problems. …

Member Avatar for sameershah21
0
3K
Member Avatar for pendo826

My methods dont seem to be working for example void Resize doeznt do anything. AM i using it in the wrong way oris the method faulty. [CODE]//Header file for Array.cpp. #ifndef ARRAY_H #define ARRAY_H template<class Datatype> class Array { private: //Template for use with the Array's data type. //Member Variables. …

Member Avatar for pendo826
0
470
Member Avatar for Shardendu

I was told to make a stopwatch program..but i am unable to figure out how to take come out of loop and pause it and again go back into the loop if resumed ( i tried the pause button on the keyboard and it works) but i have to take …

Member Avatar for NoctiS17
0
305
Member Avatar for triumphost

It reads in the whole file.. thing is, it crashes right after it hits the last line in the file.. the file is 115 lines long.. it prints all 115 lines but for some odd reason, it crashes right after :S If I remove the blank line at the end …

Member Avatar for triumphost
0
250
Member Avatar for bubbleT

Hi I'm new to XML file. I have the following format XML file and I only need to read the value for data name = "A2" in VC++. How to read the value using the XML DOM methods without looping all the nodes? My xml file is as follows: [QUOTE] …

Member Avatar for bubbleT
0
809
Member Avatar for TheFearful

Hey, I am working on a project and I want to know how to return a class object that is a Character Array. I am having trouble with it and can't find out any way to do this. Thank you for taking the time to help (:

Member Avatar for triumphost
0
230
Member Avatar for pseudorandom21

Can I use a DLL embedded in an executable (as a resource) without writing it to the disk? (Windows)

Member Avatar for pseudorandom21
0
1K
Member Avatar for pseudorandom21

I'm attempting to transfer some OpenCV images over the network, I've been trying to put them into a format I can easily encrypt and transfer, but I'm almost certain it's not going to work properly. Essentially the IplImage is a structure but it has a pointer that points to some …

Member Avatar for pseudorandom21
0
771
Member Avatar for coolbits

I want to create a struct array and get the max number of books written by particular author...The problem is that i can't get the number. I am not finished up yet with the code,but i don't know why i am not getting anything when calling the Max function.Please advise! …

Member Avatar for coolbits
0
147
Member Avatar for ClausL

Hi guys, Found this thread while searching to solve my problem ... anyone an idea why this snipet leaks? [CODE]void testMemoryLeak() { HINTERNET hSession = WinHttpOpen(NULL, WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); WinHttpCloseHandle(hSession); } [/CODE] a 20'000 loop brings memory up to 19MB VS2008 on Win7/64 building a console application Win32 Cheers …

Member Avatar for Ancient Dragon
-1
77
Member Avatar for xtinab

For a project I'm doing for class I have to make a virtual method in a class. A subclass will inherit the virtual method and instantiate it in a separate .cpp file. The problem I'm having is that I need the class that has the virtual method to instantiate its …

Member Avatar for Ancient Dragon
0
222
Member Avatar for rigoalhn

I need help with this assignment. I got some done for the input validation but im having problems to understand classes. Ill provide the code below. Design a class called Date that has integer data members to store month, day, and year. The class should have a three-parameter default constructor …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for fredz0003

[CODE]int initScoreX; int initScoreO; int oldScoreX; int oldScoreO; int newScoreX; int newScoreO; int ScoreBoard(char Player) { int ScoreBoardPositions[99]; //counting all the way to 99 //let's say X won that round, so I add 1 to the old score oldScoreX + 1 = newScore; //let's say the new score is 16 …

Member Avatar for WaltP
0
114
Member Avatar for mohy93

i need help with this program, i need to give the user 20 chances to guess, and they should be asked if they want to playagain.(by playing again i mean generating a new number with 20 new chances) after playing for how many times i should count the number of …

Member Avatar for WaltP
0
215

The End.