i have method method discussed , successful data entered 1 when more 1 can not database this programs my php form : <form class="form-horizontal" id="form-produk"> <div class="control-group" > <label class="control-label" for="kelas">kategori</label> <div class="controls"> <select class='form-control' name='id_kategori'> <?php $tampil=mysql_query("select * kategori order nama_kategori"); if ($id_kat==0){ echo "<option value=0 selected>- pilih kategori -</option>"; } while($w=mysql_fetch_array($tampil)){ if ($id_kat==$w[id_kategori]){ echo "<option value=$w[id_kategori] selected>$w[nama_kategori]</option>"; } else{ echo "<option value=$w[id_kategori]>$...
i trying test 0 initialization on virtual machine g++ options -std=c++98, -std=c++03, -std=c++11 unfortunately there not many garbage values , see zeros in place shouldn't be. how force random values can test this? #include <iostream> #include <string> using namespace std; class { public: int a; }; class b { public: b(){} int x; }; int main() { { int tab[50000] = {0}; } a; a* aa = new a; b b; b* bb = new b; cout << a.a << endl; cout << aa->a << endl; cout << b.x << endl; cout << bb->x << endl; return 0; } you not guaranteed see random numbers. c/c++ standard says uninitialized values undefined, cannot values have. 0 ok (maybe virual machine zeros memory before allocating). if need random numbers, generate them using <random>
Comments
Post a Comment