Witam uczę się programować i mam problem Visual Studio Community wgl nie działa i wyskakuje mi błąd ze debugger jest źle zainstalowany, przez to zacząłem używać Code Blocks i mimo, że program jest raczej dobrze wykonany tez mi wyskakują dziwne błędy:
#include <iostream>
#include <string>
using namespace std;
struct lista
{
string dana;
lista*glowa;
lista*next;
};
void show(lista*head);
int main()
{
lista*head=0;
head=new lista;
head->dana="test1";
head->next=new lista;
head->next->dana="test2";
show(head);
return 0;
}
void show(lista*head)
{
if(head==0)
{
cout<<"Glowa na nic nie pokazuje";
}
else
{
while(head!=0)
{
cout<<head->dana<<endl;
head=head->next;
}
}
}
I wyskakuje Process terminated with status -1073741510 (0 minute(s), 2 second(s))
Używam windowsa 10. Jakieś porady co zrobić?