| | |
Windows says it didnt work but it did.
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
C++ Syntax (Toggle Plain Text)
#include <cstdlib> #include <iostream> #include <string> using namespace std; int main() { string names[] = {"Jim", "Rob", "Sam", "Tim"}; int i; i = 0; string stain; stain = "f"; while (stain == "f") { if (names[i] == "") { stain = "p"; } i += 1; } for (int go = 0; go <= i; go += 1) { cout << names[go] << endl; } int stop; cin >> stop; }
I wrote this code to practice arrays and I just want it to loop through and print out the names. It prints out each name on new lines like its supposed to but then Windows says "names.exe has encountered a problem and needs to close. We are sorry for the inconvenience." Then it gives you the option to send an error report or dont send. How do I get that to go away?
![]() |
Similar Threads
- windows update doesn't work (Windows Vista and Windows 7)
- Image Editor Source code in C# windows application whose work like MS Paint (ASP.NET)
- Tubo C strange problem (C)
- No taskbar HELP Please (Viruses, Spyware and other Nasties)
- if statement didnt work as expected (C)
- windows XP crashes on start up :( (Troubleshooting Dead Machines)
- xp pro setup switches? (Windows NT / 2000 / XP)
- Desktop recovery (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: Cross Class Function Calling
- Next Thread: Issues with declaring vector iterator
Views: 243 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort sorting spoonfeeding string strings struct studio temperature template templates text tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






