2,839 Posted Topics

Member Avatar for xlx16

What compiler/OS are you using? This sort of thing smells like a job for MFC to me

Member Avatar for Nick Evan
0
101
Member Avatar for jephthah

[QUOTE=ZZucker;604825] I always thought that the stars where the LOL count.[/QUOTE] Tss.. I have 1 star and I dare you to find one other post then this one, where I use the word 'LOL' ;)

Member Avatar for jbennet
0
387
Member Avatar for 3m4d
Re: help

You should stop talking like a kid. 'No' and 'know' are two different words. You could also use some CAPS. Read the [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL] (the part called 'keep it clean') But on topic: how do you know that the answer is 'c' if you don't know why? If the teacher gave …

Member Avatar for hammerhead
0
369
Member Avatar for harsh2327

Actually, main DOES return a value. Never mind what you teacher told you or what Turbo thinks is normal, main returns an int. So use [icode]int main(void)[/icode] and [icode]return 0;[/icode] If you are switching compilers, you might want to look at the findfirst() and findnext() functions

Member Avatar for harsh2327
2
297
Member Avatar for d.p.l

Did you read the big fat [URL="http://www.daniweb.com/forums/thread70096.html"]README[/URL]: just above you own post? [edit] Ahh, I see you did. Good job! We posted simultainiously ;)

Member Avatar for Nick Evan
0
72
Member Avatar for daniel88

[QUOTE=Sky Diploma;604622] Correct me if i am wrong.[/QUOTE] Ok: [URL="http://www.daniweb.com/forums/post602806-11.html"]click[/URL] But you're right. Vectors would be the best solution. @Daniel: What does this code do? Does it compile? Does it give runtime errors? Please be more specific. Also when posting code, please use [icode] [noparse][code=ccp] your code here [/code][/noparse] [/icode] …

Member Avatar for Radical Edward
0
137
Member Avatar for tharris7

[QUOTE=tharris7;604634] [ICODE]char dictword[32]; }[/ICODE] [/QUOTE] Why use char arrays when c++ provides you with strings? Mixing up C and C++ is very confusing and will require a lot of casting. So what about something like: [code=cpp] string word = "abc"; string dictword; ifstream dictionary("dictionary.txt"); while (getline(dictionary, dictword, ' ')) { …

Member Avatar for Nick Evan
0
195
Member Avatar for Black Magic

to pause your program, simply use [code] std::cin.ignore(); std::cin.get(); [/code] for other (better) options click [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385"]here[/URL]

Member Avatar for Nick Evan
0
138
Member Avatar for manzoor

[QUOTE=Sky Diploma;604274]Yes, Consider this example [code] [....code] cin >> numbers [5];/* Error:: No Space allocated (This is becoz it is the 6th number) And the compiler set a space for 5 numbers and the 6th number has no space .. */ for (int n=0; n<=6;n++) { cout<< number[n]<<"\n"; } return …

Member Avatar for Sky Diploma
0
848
Member Avatar for Jennifer84

[code=cpp] ifstream File("C:\\File1\\"); std::string Line; while( getline(File, Line, ',') ) { // do stuff } // the end of the file is here [/code] It's as simple as that ;) And I wouldn't use 'File' as a name because it looks to much like : FILE. Something like 'infile' would …

Member Avatar for Jennifer84
0
274
Member Avatar for Punkis448

@ jephthah : If you are using Visual studio 200(x) you can let VS do all the hard work of indenting by pressing: [code]ctrl-a ctrl-k ctrl-f[/code] You can even change a setting so that the indention becomes 1 tab, or 4 spaces or 2 spaces or...

Member Avatar for jephthah
0
119
Member Avatar for xlx16

[QUOTE=xlx16;604246] don`t use using namespace std; and stuff like that because i think my compiler dosent work with new standards[/QUOTE] In that case you might want to post you question in the [URL="http://www.daniweb.com/forums/forum118.html"]C forum[/URL] But be sure to read [URL="http://www.daniweb.com/forums/post604203-2.html"]Salem's post[/URL] and ask a clear question. Use proper English and …

Member Avatar for Nick Evan
0
125
Member Avatar for RaDeuX

very simple: you are using ' i ' in two nested loops and every time you enter a loop i becomes 0 (lines 14 and 25)

Member Avatar for RaDeuX
0
262
Member Avatar for maui_mallard

Here's another members of the stars-club (1000+). It took me 1.5 years, so in 15 years I'll have 11000 posts too ;)

Member Avatar for jbennet
2
312
Member Avatar for dan_e6

The function is expecting an [URL="http://www.cplusplus.com/doc/tutorial/arrays.html"]array [/URL]of strings as it's second parameter

Member Avatar for dan_e6
0
265
Member Avatar for CloudKill9

[QUOTE=n1337;602784] move through the file character by character. [/QUOTE] It would work, but it a bit too 'C' for my taste. How about using the getline() function with a third parameter as delimiter? [code=cpp] ifstream file("yourfile.txt"); if (file) { std::string word; std::vector <std::string> array; while ( getline(file, word, '<')) array.push_back(word); …

Member Avatar for Nick Evan
0
96
Member Avatar for edek

It still depends on what OS you're using, so the answer would be: no, c++ does not have anything standard for that

Member Avatar for Nick Evan
0
214
Member Avatar for still_learning

You're asking two different things: If you want to replace a element in a vector, ,you should pop until you've reached the element you want to change (storing all the popped values somewhere in a temp-var), then push the new value in and then push all the old values back …

Member Avatar for still_learning
0
207
Member Avatar for Nemoticchigga
Member Avatar for disraeli

hmmm... I wonder if someone with certain Database-access could find out about who we're talking... But not to worry: the posts above my own are true as far as I know. Or maybe I just haven't found the right links yet ;)

Member Avatar for jbennet
0
250
Member Avatar for nelledawg

[QUOTE=nelledawg;600544]I thought fp = fopen(“data.dat”, “ab”); was the right way to code it. [/quote] no. it's [icode]fp = fopen("data.dat", "ab");[/icode] (wrong quotes) [QUOTE=nelledawg;600544] What do you mean when I have something useful make a copy of it? [/QUOTE] He means ALWAYS backup, backup your backups and back them up ;) …

Member Avatar for nelledawg
0
101
Member Avatar for HugoRocha

[QUOTE=hacker9801;601388]... num1 is already of [b]int[/b] type, you WOULDN'T be able to enter a character anyway.[/QUOTE] Why not? Just press something on the keyboard. It would be a good idea to check wether the input is int or not. Perhaps something like: [code=cpp] using namespace std; int main() { while(1) …

Member Avatar for HugoRocha
0
102
Member Avatar for vedmack

I think it goes like : [code=cpp] #include <windows.h> int main() { HWND hWnd = FindWindow(NULL, "The title of the window to hide here");; if(hWnd) ShowWindow(hWnd, SW_HIDE); Sleep(5000); } [/code] [edit] I missed the part where you said "by executable name", so my code is probably not what you want, …

Member Avatar for Ancient Dragon
0
113
Member Avatar for jimJohnson

How about searching monsterboard or any other job site and see how much is about average. We don't even know from which country you are, and the salaries vary a lot between countries. Especially with the weak dollar nowadays

Member Avatar for Salem
0
107
Member Avatar for joanam

Are you sure you stopped debugging correctly? Not paused or something? What debugger are you using? Perhaps you can show some code

Member Avatar for eng16danbo
0
128
Member Avatar for zidaneqrro

put this: [code=c++] std::cin.ignore(); std::cin.get(); [/code] between lines 18 & 19. your program will now wait for a " \n" (enter) to be pressed before exiting. for a more detailed solution (and better) look [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385"]here[/URL]

Member Avatar for William Hemsworth
0
142
Member Avatar for zidaneqrro

You should look at functions as a vendingmachine. You put some input in it (in your case two ints) and it gives you something back. That's what the [icode]return[/icode] does in your function. So you need something to put the returned value in. That what the 'difference' variable does. It …

Member Avatar for Sky Diploma
0
83
Member Avatar for Agni

and don't forget to [icode]delete[/icode] the memory once you're done with it

Member Avatar for Agni
0
15K
Member Avatar for GrimJack
Member Avatar for flower77

nah. You got the assigment wrong. You start with an array of ints. for example: int number[10] = {1,2,3,4,1,6,7,8,9,1}; Now you will have to write a program to see how often the number '1' appears in the array. The easiest way to do this is to make a loop that …

Member Avatar for Ancient Dragon
0
123
Member Avatar for Agni

You'll have to contact Dani about that. It has been done before (JoeProgrammer and Proliant_Fan aka John A and JBennet :) )

Member Avatar for William Hemsworth
0
332
Member Avatar for zandiago

[QUOTE=jbennet;595108]please dont do "loooooooooooooooooooool" or you will get a warning[/QUOTE] "Respect my authoritah!" ;)

Member Avatar for jbennet
0
862
Member Avatar for kv79
Member Avatar for nurulshidanoni

[URL="http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_sorting.aspx"]Tutorial[/URL]

Member Avatar for Laiq Ahmed
0
90
Member Avatar for Cosa

How big are the matrices? What values do rowsa and columnsb have? The segmentation fault probably has something to do with you getting out of array-bounds, but without the complete code, I can't tell.

Member Avatar for Cosa
0
113
Member Avatar for qq9000

You do know that you've declared a 2-d arrays of chars, not an array of strings right? If you use std::string, you could use the swap() function, which might be very handy with selection sort. If you google for sort and strings, you'll get some nice [URL="http://www.codepedia.com/1/CppSelectionSort"]demo-code[/URL].

Member Avatar for Nick Evan
0
82
Member Avatar for Adrian99420

[QUOTE=Adrian99420;594720]Any idea? I need this in urgent...thanks[/QUOTE] You ALWAYS need it "urgent". Stop bumping your threads, it's annoying, against the rules and won't get you help any sooner. With that said, you need to take a look at [URL="http://msdn2.microsoft.com/en-us/library/ms645481(VS.85).aspx"]GetDlgItem[/URL](). It's a function to get all the items from an dialog …

Member Avatar for Nick Evan
0
76
Member Avatar for Ancient Dragon

I think DMR was super-mod at the time he changed all the polls to wombats. I guess that was the reason to change this. I personally liked the wombat-mania ;)

Member Avatar for jbennet
0
67
Member Avatar for anonymous_cutie

[QUOTE=peter_budo;590203]@jbennet - this sort of topic students do from all over the world, [/QUOTE] You're right. I've already made an autonomic robot that had color and object detection to participate in a ball-grabbing contest and I still have a year left on the "HTS" (don't know the English equivalent) I'll …

Member Avatar for jbennet
0
246
Member Avatar for VisActualyBasic

[QUOTE=VisActualyBasic;589423] Whats my native language: Lived 20 years in Croatia Lived 17 years in Belgium Live currently (last 13 years) in Australia Mother German [/QUOTE] Wow.. You've been around. 3 countries and 3 marriages, is that related somehow? ;)

Member Avatar for Serunson
0
121
Member Avatar for timdog345

your loop should look like this: [code=c] // loop while i is between first and second input for (i=firstNumber; i <= secondNumber; i++) { // now using an if statement check if the number is odd or even } [/code] You should have a look at the modulus % operator …

Member Avatar for Rajith Cherian
0
109
Member Avatar for KeeperOfTime

Why would you even want to mess around with dos anyway? A 32 bit OS runs on almost anything nowadays. I mean, even your telephone probably runs on something like WinCE or Solaris

Member Avatar for KeeperOfTime
0
126
Member Avatar for only me

Aaahhh my eyes... Please don't use color tags in plain text. Also: This is not a homework service. No one will write your homework for you if you show no effort at all. This is explained [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]here[/URL] So what have you made so far? Please use [noparse][code=cplusplus] // code here[/code][/noparse] …

Member Avatar for deeed
0
313
Member Avatar for pete212

whenever I try something new, I use [URL="http://www.google.com"]google[/URL] to search for [URL="http://c-programming.suite101.com/article.cfm/c_tutorial_file_handling_commands"]tutorials...[/URL]

Member Avatar for pete212
0
85
Member Avatar for a2008

Post the code you have so far, it's easier to give advice that way. (and if you want to score some credit, use [noparse][code=cpp] //your code here [/code][/noparse] tags)

Member Avatar for Nick Evan
0
148
Member Avatar for bradszy
Member Avatar for Afi83

[QUOTE=Afi83;585203]I know the loop don't enter. if you see i mentioned that i my question. [/QUOTE] Yes, he saw that. He also explained your problem for you, so that you can come up with a solution yourself. This is a great attitude if you want people to ignore your problem, …

Member Avatar for Afi83
0
437
Member Avatar for froger

Goto start->run type: regedit [enter] goto HKEY_LOCAL_MACHINE goto SOFTWARE goto MICROSOFT goto WINDOWS goto CURRENTVERSION goto RUN click on the folder run, which you've just openend You'll see a white icon with a red 'ab' in it an the right side saying: rundll32.exe "C:\WINDOWS\system32\upefwdyk.dll" select it and press delete. Job's …

Member Avatar for crunchie
0
151
Member Avatar for Mark515

assuming the number is inputted by the user: [code] get user input loop trough each character and look if it's a digit replace the character with * [/code] Have a look at the [URL="http://www.cppreference.com/stdstring/isdigit.html"]isdigit()[/URL] function

Member Avatar for iamthwee
0
66
Member Avatar for AWKTM

You'll have to give a bit more information. What is your program's input? The Fault? How do you get the input, keyboard/file/socket/other What have you tried so far?

Member Avatar for AWKTM
0
102

The End.