2,839 Posted Topics

Member Avatar for blaec

[quote] if (ch = 32) { [/quote] You should change this to : [icode]if (ch == 32)[/icode] The single '=' means that you are checking if ch can be assigned the value '32'. What you want to do is : check if 'ch' contains the value '32'. (double ==) and …

Member Avatar for blaec
0
209
Member Avatar for Google Spider

The program looks better now. If you want some minor performance tweaks: change [icode]for(count=1;count<=x;count++)[/icode] to [icode]for(int count=1;count<=x;count++)[/icode] and remove the previous declaration of count. This has a few advantages: - the memory declared for count, is cleared after the loop is done - your program will look better, less declaration …

Member Avatar for Agni
0
110
Member Avatar for toolbox03

[URL="http://www.cplusplus.com/reference/iostream/istream/getline.html"]getline[/URL]() would be the function for you. Just use a space ' ' as a delimiter.

Member Avatar for toolbox03
0
115
Member Avatar for munkey_boy

You're probably messing with memory that isn't yours, or accessing a file that is accessed at the same time by something else, or writing to a socket that was closed or never opened, or .... Without seeing your code, it just a guessing game

Member Avatar for munkey_boy
0
106
Member Avatar for Adrian99420

Why not just close the second form? [edit] I've actually read your code and the errors in it have nothing to do with the question you asked here. - in form2.h add the line [icode]#include "form3.h"[/icode] - in interface.cpp change [icode]#inclide "form2.h"[/icode] to [icode]#include "form2.h"[/icode] Code works fine after these …

Member Avatar for Nick Evan
0
89
Member Avatar for usman_2x

OpenCV's HAAR-detection is what you need. Be aware that the learning-time will be enormous, specially for objects that 'look alike' like an arm or a leg... There's a face-detection demo-program in the tuts from OpenCV, you might want to take a look at that. Niek

Member Avatar for Nick Evan
0
104
Member Avatar for electromania

in main.c: [icode]#include misc.h[/icode] in misc.c: [icode]#include misc.h[/icode] Put your main() in main.c and your function prototypes in misc.h

Member Avatar for Nick Evan
0
40
Member Avatar for tootypegs

You could use findfirst() and findnext() to get the names of all the files in a derectory, then just use a loop to open and process them. [edit] [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046380353&id=1044780608"]Here's[/URL] some samplecode

Member Avatar for tootypegs
0
112
Member Avatar for amt_muk

strtol takes an extra parameter that can be set to what array-element it should convert. So you could only convert the first 3 chars to a long, or 10 or the middle 5 or ... etc. atol does not have this functionality. [edit] And what Narue says is also true, …

Member Avatar for amt_muk
0
437
Member Avatar for ahjiefreak
Member Avatar for ahjiefreak
0
245
Member Avatar for Black Magic

You could make an array of strings and then randomly select one from this array using rand(). If you search for rand() on the site, you should get a lot of example programs. Niek

Member Avatar for Ancient Dragon
0
81
Member Avatar for pukkalol

[QUOTE=Sohiab;580592][B]I'll help you. Check PM![/B][/QUOTE] Please read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]this[/URL] the part about 'keep it on the site'

Member Avatar for Nick Evan
0
279
Member Avatar for computer engW

you should create a loop which takes in a number with every pass, adds it to a total number and stores how many numbers where entered (how many passes the loop made) Then you would need something to break out of the loop. When you're out of the loop, calculate …

Member Avatar for computer engW
0
95
Member Avatar for digital_ice7

What Vmanes said and: This line: [icode] acc_num[x] = rand()%10; //generate account number[/icode] Will always generate the same sequence of numbers because you haven't seeded the function rand() with [icode]srand()[/icode] Most people use [icode]srand((unsigned)time(0));[/icode] for this. [code=c] return 0; system("pause"); [/code] The line [icode]system("pause");[/icode] will never be reached because you …

Member Avatar for Nick Evan
0
107
Member Avatar for Taker

[QUOTE=Taker;580035]do you want the txt file or not[/QUOTE] That would be a good idea. If the textfile has a lot of similair lines, just post the first few lines. Also: Define 'bugs'. What output are you expecting and what IS the output. When do the bugs occur?

Member Avatar for Taker
0
186
Member Avatar for El Duke

If you understand the logic behind the Search-Algorithm, C++ (or even C) could certainly be used to implement it. Without knowing exactly how much you know about programming it is impossible to know how much time it would take you. I used the 'google-search' and found this zip file you …

Member Avatar for El Duke
0
99
Member Avatar for Swift7625

I've had this problem in the past. I used a custom function made by someone else, because I couldn't write my own... [URL="http://www.openasthra.com/c-tidbits/i64toa-converts-a-64-bit-integer-to-string/"]Click[/URL]

Member Avatar for Salem
0
429
Member Avatar for nurulshidanoni
Re: Why

[quote=Lerner] If that doesn't work, and it may well not, then I'd try reposting, enclosing all your code, including the last 4 closing curly braces and hope that will maintain indenting to make the code more readable [/quote] So please repost you complete code

Member Avatar for nurulshidanoni
0
112
Member Avatar for hepsy.i

You could use a timer-control. Here's a good [URL="http://www.vbdotnetheaven.com/Uploadfile/mahesh/TimerControl04262005033148AM/TimerControl.aspx"]tutorial [/URL]

Member Avatar for Nick Evan
0
92
Member Avatar for nurulshidanoni

You can't nest functions like this: [code=cplusplus] int main() { [...] void sortit(int exams.at(i).total.at(j), int exams.size()) { [...] } }[/code]

Member Avatar for mitrmkar
0
614
Member Avatar for lizhiyuan

Tutorial on cubes: [URL="http://cgm.cs.mcgill.ca/~msuder/courses/557/tutorial/tutorial.html"]link[/URL] tutorial on textures: [URL="http://www.nullterminator.net/gltexture.html"]link[/URL]

Member Avatar for lizhiyuan
0
89
Member Avatar for Sky Diploma

I'm not sure what output you are expecting. Could you post an example of what your program is supposed to do?

Member Avatar for Sky Diploma
0
100
Member Avatar for coolerli

[QUOTE=coolerli;578974]solve it already[/QUOTE] What?! I really hope that is a typo and you meant: "solveD it already"....

Member Avatar for Narue
0
75
Member Avatar for BroKeN

[QUOTE=Ancient Dragon;578931]I don't take kindly to people who laugh so much :)[/QUOTE] I thought Narue was kidding here: [QUOTE=Narue;568027] Ancient Dragon [...] The rest of the time he's your typical cranky old man. [/QUOTE] But you've just proven her point ;) Just kidding ofcourse

Member Avatar for jbennet
0
94
Member Avatar for natd

[code]sentence[0] = toupper(sentence[0]);[/code] sentence[0] is a char array, but toupper() only excepts 1 char as input. This is a C program, but you've posted in the C++ forum. Are you allowed to use C++? Because std::string would make your live a whole lot easier. Niek

Member Avatar for natd
0
95
Member Avatar for MidiMagic

Go to here: [URL="http://www.daniweb.com/forums/"]http://www.daniweb.com/forums/[/URL] and click on a yellow folder-icon to mark the forum as read. Niek

Member Avatar for Dani
0
171
Member Avatar for Dani

What I would really like is that the controlpanel would auto-refresh every x minutes. I usually have my laptop viewing my controlpanel on daniweb while I'm programming on my PC. Sometimes you are helping someone that is on-line so he will respond very fast to my reply. I know it …

Member Avatar for MidiMagic
0
895
Member Avatar for lolodede
Re: c++

[quote][icode]char word, word1, word2,word3, length;[/icode][/quote] You've declared everything as chars, not strings. A char is ONLY ONE character, not a word. So declare them as strings like this: [icode] std::string word1, word2,word3;[/icode] Length doesn't have to be declared and you still have one if statement wrong. Please re-read AD's post …

Member Avatar for ivailosp
0
252
Member Avatar for brianvolkmann

[QUOTE=Sky Diploma;576739]Hey Try compiling it with any other compiler or try this [code] #include<conio.h> [..] void main() [...] clrscr(); [...] getch(); [/code][/QUOTE] That won't work on any other compiler because it isn't standard C. It will probably only work on Turbo C, which is outdated. At brianvolkmann : You have …

Member Avatar for Nick Evan
0
153
Member Avatar for roachic

One way of getting the current folder is: [code=cplusplus] #include <direct.h> #include <iostream> int main() { char buffer[100]; getcwd(buffer, 100); std::cout << buffer << std::endl; return 0; }[/code] Niek [edit] After trying the code I noticed that getcwd was declared deprecated, so you should use [URL="http://msdn2.microsoft.com/en-us/library/sf98bd4y(VS.80).aspx"]_getcwd [/URL]instead [/edit]

Member Avatar for roachic
0
97
Member Avatar for Arne Kristoffer

Very simple mistake: [icode]if (str[x] == "a")[/icode] should be: [icode]if (str[x] == 'a')[/icode] You are comparing each character from a string with another character, so you need single quotes instead of double [quote] if I have done something against the forum rules [/quote] Actually, you are one of the few …

Member Avatar for Arne Kristoffer
0
22K
Member Avatar for programmer321
Member Avatar for xsoniccrackersx

No it's not, but it's a helping hand. In the code given each line is stored (in a loop) in the string "answers". So what you need to do is combine the two programs so that your own function will parse these strings

Member Avatar for xsoniccrackersx
0
1K
Member Avatar for nedimavci
Member Avatar for lizhiyuan

Time for some ASCII art [code] (x1,y1) |----------------------| | | | | | | |----------------------| (x2,y2) [/code] You see how 2 points can make a rect? Learn more about OpenGl and C++ by visiting some links [URL="http://www.daniweb.com/forums/thread63827.html"]here[/URL]

Member Avatar for Nick Evan
0
147
Member Avatar for The Dude
Member Avatar for majestic0110
0
101
Member Avatar for rohit83.ken

Does the file exist on you harddrive? If not: Do you have the iptables-devel & libnet packages installed?

Member Avatar for jephthah
0
576
Member Avatar for sarojraj

If you mean changing the language for Windows/IE , reinstalling would be the only option that I know of. Niek

Member Avatar for sarojraj
0
278
Member Avatar for carly
Member Avatar for demroth

I think (s)he means something like : [icode]string Number = "001";[/icode] at OP: Why not convert every line to integer and then sort them as integers. You wouldn't need char-arrays and your sorting should be easier to code. Niek

Member Avatar for demroth
0
154
Member Avatar for wsn

[QUOTE=wsn;575712] this code is not even compiling Can anyone please help me =)? Thanks[/QUOTE] You have a bracket mismatch in this line: [icode]#define NBIT(X,N) (((X&(1<<N))?1:0)[/icode] there is 1 opening bracket to many. so changing it to : [icode]#define NBIT(X,N) ((X&(1<<N))?1:0)[/icode] should solve the problem. then remove all the unsigned crap. …

Member Avatar for wsn
0
102
Member Avatar for Jboy05

Here's a [URL="http://www.hitmill.com/programming/cpp/forLoop.htm"]tutorial[/URL] on 'for loops'

Member Avatar for Jboy05
0
99
Member Avatar for timberland26

Before I say anything else: I fully agree with Ancient Dragon. This is NOT an assignment for a beginner in C++. But if you decide to go ahead and give it a try: I would suggest using [URL="http://opencvlibrary.sourceforge.net/"]OpenCV[/URL] for image-processing What country are you from? Do your coins have different …

Member Avatar for Nick Evan
0
291
Member Avatar for Galaxiaunit

[QUOTE=Galaxiaunit;570221]By the Way how did You made these Numbers in Code I would like to know that ?[/QUOTE] To get the line numbers and code-coloring use [noparse][code=cplusplus] your code here[/code][/noparse] tags The first error the compiler gives you is about this line [icode]rodzaj[10];[/icode] (line 9) You didn't give it a …

Member Avatar for Traicey
0
574
Member Avatar for technogeek_42

[quote=jwenting]"get Outa Here, Now!"[/quote] :) [QUOTE=technogeek_42;521411] Y they create a virus?[/QUOTE] All sorts of reasons. Maybe they want to have your adressbook, maybe your creditcard numbers or maybe they're just doing it for the kick. Asking why people make virussses is the same thing as asking why hooligans exist Niek

Member Avatar for Jx_Man
0
268
Member Avatar for kahaj

You should use a loop from that loop from the first item in the list to the n-th.

Member Avatar for Nick Evan
0
124
Member Avatar for linux

That's funny... If I compile a big program or run a game my fan also kicks in. Maybe my laptop is just absolutely STUPID? Niek

Member Avatar for MidiMagic
0
404
Member Avatar for naiad08

@Narue: If you want to promote your own website, go to the [URL="http://www.daniweb.com/forums/forum43.html"]promotions[/URL] forum. ;)

Member Avatar for jamshid
0
167
Member Avatar for The Dude

I got 22 Warning: spoiler: saw children of the korn the crow butterfly effect seven the ring texas chainsaw massacre scream the fly invisible man birds jaws alien nightmare on elm street halloween a clockwork orange beetlejuice war of the worlds pumpkinhead blade piranha [one more that I forgot to …

Member Avatar for Nick Evan
0
99
Member Avatar for crisjoyce

How to code: I always use a keyboard Now try to ask a clear question with your problem and any attempts you've made and post again. Niek

Member Avatar for skatamatic
0
108

The End.