address of elements of structure of different types
<p>i want  to find address of elements of structure in memory
here is my code</p>

<pre><code>  #include &lt;iostream&gt;
using namespace std;
struct B{
int k;
float t;
char s;
unsigned int m;
long q;
double x;
unsigned long z;
};

int main(){    
    B   b[]={3,4.23,'A',123,123L,23.340,700};
    void *t=&amp;b[0];
    void *n=&amp;b[0]+7;
    while(t!=n){        
        cout&lt;&lt;t&lt;&lt;endl;
        t++;    
    }
    return 0;
}
</code></pre>

<p>i dont know if it is correct code and also here is errors</p>

<pre><code>1&gt;------ Build started: Project: tests, Configuration: Debug Win32 ------
1&gt;  tests.cpp
1&gt;c:\users\7\documents\visual studio 2010\projects\tests\tests\tests.cpp(16): warning C4305: 'initializing' : truncation from 'double' to 'float'
1&gt;c:\users\7\documents\visual studio 2010\projects\tests\tests\tests.cpp(22): error C2036: 'void *' : unknown size
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>

<p>please help</p>
