344 Posted Topics

Member Avatar for JOLO14

You need to put `OSOBA o;` in the scope of the `while` loop and reset the stringstream. while(getline(ifsSubor, sRiadok)) { // scope OSOBA instance OSOBA o; ss << sRiadok; ss >> o.meno; ss >> o.priezvisko; while (ss >> bod) { o.body.push_back(bod); } // reset ss ss.str(std::string()); ss.clear(); osoby.push_back(o); } In …

Member Avatar for NathanOliver
0
177
Member Avatar for shelton22

Start out simple and build on your code from there. Use a for (int i = 0; ...) loop Check if each array at index i has a value of zero, if it does then print the index. Once you've got that part done, you can use a while loop …

Member Avatar for iamthwee
0
510
Member Avatar for mickeybr

> The "file missing" logs are probably the most indicative that you have been seriously hacked, and should NOT be running this system as-is now. No, the "file missing" entries are indicative of WOW64 redirection. HijackThis is terribly outdated and shouldn't be used on 64 bit systems. For serious malware …

Member Avatar for deletedaccount
0
329
Member Avatar for smitsky
Member Avatar for 111100/11000

In the hpp file you have: #define ROW_LENGTH 4 int correctAnswer[ROW_LENGTH-1]; // correctAnswer[3] int userSolution[ROW_LENGTH-1]; // userSolution[3] Meaning that correctAnswer[3] is out of bounds for the array and therefore due to memory alignment has the same address as userSolution[0].

Member Avatar for nullptr
0
539
Member Avatar for Rushin1992
Member Avatar for Assembly Guy
0
103
Member Avatar for willygstyle

This should work, I'll leave it to you to play 'spot the difference' #include <iostream> #include <string> #include <ctime>// clock_t, clock, CLOCKS_PER_SEC unsigned int timer() { return clock(); } int main() { std::string hello = "Wake up Neo..."; unsigned int pos = 0; unsigned int milli = 0; unsigned int …

Member Avatar for willygstyle
0
182
Member Avatar for Praveen_10

> The code runs fine without any modification!!! You may think it does, but it certainly doesn't. Put a cout message before the call to growArray: if ( size == next_element + 1 ) { // now all we need to do is implement growArray cout << "\nCalling growArray()\n"; p_values …

Member Avatar for nullptr
0
204
Member Avatar for jtjudge

At line 63 you have `cout << CorpData;` You need to use an instance of CorpData, for example `cout << West;` You'll also need to set the precision when you output the data seeing as it contains double precision values. If you add `limits` to your includes, then the function …

Member Avatar for Ancient Dragon
0
324
Member Avatar for cambalinho

> how can i validate the Speak() function without re-declare it inside of Cow class? The only way I can think of is to make the base class Speak() function non-virtual, so that every derived class inherits the same func. class Animal { public: void Speak() { cout << "Generic …

Member Avatar for cambalinho
0
290
Member Avatar for cambalinho

Something like this? hbrBackground = CreateSolidBrush(RGB(241, 245, 251)); // case WM_PAINT: { LPPAINTSTRUCT lpps = new PAINTSTRUCT; HDC hdc = BeginPaint(hWnd, lpps); FillRect(hdc, &lpps->rcPaint, hbrBackground); // other code }

Member Avatar for cambalinho
0
796
Member Avatar for bejfake
Member Avatar for bejfake
0
545
Member Avatar for Sarkurd
Member Avatar for vishalonne

> If my friend logic is correct then why I am getting always 0 from random(2), why not getting 1 atleast once out of 37 execution of the code. You never seed the random number generator with a call to `randomize()`, therefore you will always get exactly the same result …

Member Avatar for vishalonne
0
272
Member Avatar for smitsky

As well as sepp2k's advice, you're coming across one of the common problems associated with declaring `using namespace std;` Remove the namespace and change your function to `int stringConvertInt(std::string raw)` and then there won't be any ambiguity as to which pow function is to be used.

Member Avatar for smitsky
0
235
Member Avatar for Gurjot_1

The code where you read name: ch = infile.get(); while(true) { if(isdigit(ch) || ch == '\n') break; else word += ch; ch = infile.get(); } > textfile looks like this: > Apple Juice 1.50 20 In your code, you read the name as a series of single characters and break …

Member Avatar for nullptr
0
256
Member Avatar for DS9596

At line 42 you have: `int largest = a[100];` which is out of bounds for the array. Set largest to `a[0]` At line 45, you're checking the wrong condition, you need to check whether the value is greater: `if (a[i] > largest)` Seeing as smallest and largest are (now) initially …

Member Avatar for nullptr
0
206
Member Avatar for agrbinoo.albaker

You need to move the prompt for Numbers (lines 8 and 9) to inside the `y` loop. line 14 should be: `sum += n;` After that you'll need to [flush the input stream](http://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream).

Member Avatar for agrbinoo.albaker
1
981
Member Avatar for <M/>

One of my dogs had an ear infection and the odour was exactly as you've described. The only treatment was with antibiotics. These infections can cause a dog an awful lot of pain if left untreated, so I'd recommend taking him to the vet ASAP. Your nose and the dog …

Member Avatar for Agilemind
1
420
Member Avatar for michelemalta

There's no obvious error in the snippet of code you've posted. A complete working example based on your code: #include <iostream> int main() { using std::cout; using std::endl; const size_t length = 26; const char alphabet[length] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', …

Member Avatar for vmanes
0
211
Member Avatar for michelemalta

typedef char alphabet[26]; alphabet alpha = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; What you could do is iterate through the text that you read in and use a …

Member Avatar for nullptr
0
294
Member Avatar for DUB1799

line 18: `int Main()` should be int main() - note case sensitivity. Also you never call your rollDice function, so you'll never know the roll count. line 29: does nothing, seeing as you are not getting input for `y` from the console. Can you work out how and where to …

Member Avatar for vmanes
0
1K
Member Avatar for Tcll

For sources, just google for linux ntfs source code, or look at the source for any linux distro.

Member Avatar for Tcll
0
162
Member Avatar for gu mi nam

I'm about to go to bed, so I've not commented much of the code. You also need to write a function to free the memory used by each node. Here's your code, with the global variables moved to inside main() #include <iostream> //#include <conio.h> //#include <algorithm> //for brevity only using …

Member Avatar for gu mi nam
0
399
Member Avatar for Mehul Jain
Member Avatar for Ancient Dragon
0
63
Member Avatar for Suzie999

Are you calling SendInput like this: int screen_x = GetSystemMetrics( SM_CXVIRTUALSCREEN ); int screen_y = GetSystemMetrics( SM_CYVIRTUALSCREEN ); INPUT input = {0}; input.type = INPUT_MOUSE; input.mi.dx = (x * 65535) / screen_x; input.mi.dy = (y * 65535) / screen_y; input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; UINT ret = SendInput( 1, &input, …

Member Avatar for Suzie999
0
764
Member Avatar for john.kane.100483

Follow Schol-R-Lea's advice regarding fixing the conversion functions. For the code you posted above, remove the do while loop from `void Screen_Header()` and simplify it to: void Screen_Header() { clrscr(); gotoxy(1,3); printf("Conversion from any base to base 10"); gotoxy(1,5); printf("a - Binary"); gotoxy(1,6); printf("b - Octal"); gotoxy(1,7); printf("c - Hexadecimal"); …

Member Avatar for David W
0
713
Member Avatar for Stanley_3

See if you can get a hold of the Windows 8 "Use now and serve me a subpoena later" edition.

Member Avatar for deceptikon
0
146
Member Avatar for LynnCarter62

What operating system are you running and is it 32 or 64 bit? What anti-virus is installed? To get started, download and install [Malwarebytes Anti-Malware](http://downloads.malwarebytes.org/mbam-download.php), let it update the database, then run a Quick Scan. Allow it to quarantine anything detected and reboot to complete disinfection. Attach the log file …

Member Avatar for LynnCarter62
0
273
Member Avatar for Ekundayo

Try running scans with [AdwCleaner](http://www.bleepingcomputer.com/download/adwcleaner/dl/125/) and [Junkware Removal Tool](http://www.bleepingcomputer.com/download/junkware-removal-tool/dl/131/). Post back if these don't get rid of it.

Member Avatar for joserey
0
359
Member Avatar for neyoibarra

@Solomon bekele, do not hijack someone elses thread. Please start your own thread and provide the code you have written so far. @neyoibarra, have a look at the functions referenced at http://www.cplusplus.com/reference/cctype/ > or if he tries to press a number nothing will come up on the program, almost as …

Member Avatar for David W
0
130
Member Avatar for neha.jebin.18
Member Avatar for neyoibarra

Here's some code I threw together that demonstrates what you're looking to do. int main() { using std::cout; using std::endl; using std::cin; const int bufsize = 100; const int max_pwd = bufsize - 1; char password[bufsize]; // = {0}; password[0] = '\0'; cout << "Enter the password: "; for (int …

Member Avatar for nullptr
0
172
Member Avatar for Rahul47

[This tutorial](http://win32assembly.programminghorizon.com/tut2.html) explains the steps needed to link a simple MessageBox program.

Member Avatar for Rahul47
0
1K
Member Avatar for sevichu

This sounds like a ZeroAccess infection. Run a scan with RogueKiller and post the log file. For 32 bit OS - http://www.adlice.com/softs/roguekiller/RogueKiller.exe For 64 bit OS - http://www.adlice.com/softs/roguekiller/RogueKillerX64.exe Also post the log from Malwarebytes as suggested in the above post.

Member Avatar for robert02
0
704
Member Avatar for humphreytarpeh

Download from http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=al-74850-1&cc=au&dlc=en&lc=en&os=4063&product=3390947&sw_lang=

Member Avatar for nullptr
0
144
Member Avatar for opel123

Use `std::getline(cin, deleteMovie);` At present, if you entered 'when i met your mother(2009)', only 'when' would be read into deleteMovie. The behaviour you see after that is because the input stream isn't empty. Refer to http://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream Also, remove the calls to `main()` from your switch cases. Never use recursive calls …

Member Avatar for Ancient Dragon
0
15K
Member Avatar for khader(ldo)
Member Avatar for Ancient Dragon
0
142
Member Avatar for Bo_1
Member Avatar for Bo_1
0
271
Member Avatar for refphlex

Would something like the following fit the requirements? std::string str = "455454554"; std::cout << "*-" << str.substr(str.size() - 4, std::string::npos) << std::endl;

Member Avatar for nullptr
0
77
Member Avatar for jonathan710

At line 12 you've declared an iterator: `vector<int *>::iterator itr = ptrList.begin();` So just use it to iterate through the vector. vector<int *>::iterator itr = ptrList.begin(); for( itr; itr < ptrList.end(); ++itr ) { cout << **itr << endl; }

Member Avatar for nullptr
0
262
Member Avatar for cambalinho

`cout << *static_cast<int*>(test);`, in what way doesn't this print the int value "in a string way"? > imagine that int is 200, i want print 200, but in a string way Do you mean that you want to store the int value in a std::string? int i = 12; void …

Member Avatar for cambalinho
0
5K
Member Avatar for jonathan710

Line 17: `cout << *itr << endl;` *itr is of type Integer, so what you want is the value member of class Integer `cout << static_cast<Integer>(*itr).value << endl;`

Member Avatar for DeanMSands3
0
269
Member Avatar for Prithvi.R.K

Seeing as in [this post](http://www.daniweb.com/software-development/c/threads/467246/exit-and-clrscr-not-declared-in-the-scope#post2035097) you just copy/pasted from [wiki answers](http://wiki.answers.com/Q/C_program_for_set_union_and_intersection_operations#slide2), I suggest that you study and learn from what you posted. Once you do that, there'll be no reason to ask this question.

Member Avatar for Prithvi.R.K
0
204
Member Avatar for Prithvi.R.K
Member Avatar for Dane2259

The inner loop should be `for (int j=i; j>0; j--)` Your logic is correct, though the sum will only apply for 1 + 2 + ... + 1039 = 540,280 ct1 could be written as: int ct1 = 0; for (int i = 0; i < 1040; ++i) ct1 += …

Member Avatar for nullptr
0
96
Member Avatar for catastrophe2

In Student class change setDate to: void Student::setDate(Date x) { this->birthdate = x; } Then in main() after setting the members of Date you need to call: a[i].setDate(d); I assume that checking for valid data wasn't a requirement. eg integer overflow, inputting a string etc

Member Avatar for catastrophe2
0
189
Member Avatar for dee101g

There's a work around that enables you to download and save the 8.1 ISO to external media. Details at http://www.neowin.net/news/here-is-how-to-get-the-windows-81-iso-and-create-a-usb-install-stick

Member Avatar for nullptr
0
169
Member Avatar for sing1006

line 17: Should be `double sum = 0;` line 28: You can't return 2 parameters #include <stdio.h> #include <stdlib.h> double average(int arrx[6], int *ptr); int main(void){ int arry[6]= {2, 5, 4, 5, 6, 7}; int count = 0; double avg; avg = average(arry, &count); printf("The average is %.2f\n", avg); printf("The …

Member Avatar for Moschops
0
187
Member Avatar for Techno22

> Is there any way to retrieve? Not this time. To retain your tabs, go into CCleaner preferences and uncheck the Firefox preference 'Session'

Member Avatar for Techno22
0
129

The End.