//changed auto to register
exporttemplate < registervolatileconstunsignedlonglongint value > inlinevolatilestaticconstunsignedlonglongint * const & function(void);
#include <iostream>
#include <algorithm>
#include <string>
#include <allegro>
usingnamespace std;
int main()
{
cout << "hOW are you are play wow i dont love you no you me \n";
return 0;
}
true story based on post on one of the polish programmers forums
quote:
Does anyone know how to solve the problem with large files?
I have built a mp3 database. Here are the fields inside my class body:
1 2 3 4 5 6 7 8 9 10 11 12 13
int ile;
[code]char autor[100000][40];
char tytul[100000][40];
char album[100000][40];
char info[100000][1000];
char nazwapliku[100000][200];
char nazwa[100000][100];
int priorytet[100000];
char kategoria[100000][20];
char podkategoria[100000][20];
int fade[100000];
bool zablokowane[100000];
int id[100000];
Of course every field is created dynamically
and now when I'm trying to store it an error occures: Accessviolation. Size of my file is only 1MB and field char autor[100000][40];ca. 4MB
I have tried to save by turn only those records i used, but the same error occured when trying to assign it to the structure...
char tytul[100000][40];
Am I wrong, or this is actually an array of 40 titles of 100,000 characters each, rather than an array of 100,000 titles of 40 characters each?
//Illusion.cpp
/****************************************************************************/
/* Run to see a rather subtle illusion */
/* Move your head to and fro from the output screen to see a strong wave */
/* You might even see small black dots that actually aren't present */
/* (This happens when you are at some distance from the screen) */
/****************************************************************************/
//Made by harryp
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size=24,cnt,bg,row,col;
cnt=size-1;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
for(row=1;row<=(2*size-1);row++)
{
if(row<=size)
{
for(bg=cnt+16;bg>0;bg--)
{ cout<<"\\"; }
for(col=1;col<=(2*row-1);col++)
{ cout<<"/"; }
for(bg=cnt+16;bg>0;bg--)
{ cout<<"\\"; }
cout<<endl;
cnt--;
}
//--------------------------------------------------------------------
elseif(row>size)
{
for(bg=-cnt+16;bg>0;bg--)
{ cout<<"\\"; }
for(col=1;col<=(2*size-1+2*cnt);col++)
{ cout<<"/"; }
for(bg=-cnt+16;bg>0;bg--)
{ cout<<"\\"; }
cout<<endl;
cnt--;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
getch();
}
//END OF PROGRAM