- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 1
12 Posted Topics
[QUOTE=;][/QUOTE] You may want to overload >> operator to write to a two dimentional array. There is no default implementation
[QUOTE=;][/QUOTE] Program: Enter the name of the Circle User Commits suicide
[QUOTE=;][/QUOTE] This is wrong [code] if (A[i] == 0 || B[i] == 0) [/code] Should be replaced by [code] if (A[i] == 0 ) [/code]
[QUOTE=;][/QUOTE] Dear mweshk there are far too many errors in your code, i managed to make the program work.. but ... [code] #include <iostream> #include <fstream> #include <iomanip> #include <cctype> using namespace std; const int DESC_SIZE = 51; // holds inventory description size const int DATE_SIZE = 11; // holds …
[QUOTE=;][/QUOTE] you can use global variabled or shared memory
[QUOTE=;][/QUOTE] [code] #include<iostream> using namespace std; union test { int i; float j; double k; }; int main() { test obj1; cout<<sizeof(obj1)<<endl; cout<<(int)(&obj1 + 1) - (int)(&obj1)<<endl; return 0; } [/code]
[QUOTE=;][/QUOTE] [code] if(kbhit()) { char ch = getch(); if(ch=='A') cout << "You pressed A" << endl; } [/code]
[QUOTE=subith86;1760282]ok. Thanks. So[CODE]i = i++;[/CODE]is undefined because of two assignments happening 1. modification done using = operator. 2. modification done by ++ operator. So if my understanding is correct this assignment should be okay and doesn't have undefined behavior.[CODE]i = ++i;[/CODE] Am I right?[/QUOTE] How is it undefined? final value …
[QUOTE=;][/QUOTE] [code] int main() { for(int i=0;i<5;i++) { int prev=0,curr=0; for(int j=1;j<=i+1;j++) { curr=prev+pow(double(-1),j+1); cout<<curr<<" "; prev=curr; } cout<<endl; } return 0; } [/code]
Please review your logic it is seriously flawed
[QUOTE=;][/QUOTE] Where did you allocate the memory
[QUOTE=;][/QUOTE] for 0 -1 4 -9 16 -25 36 -49 64 -81 100 use number*number*(-1 raised to the power number)
The End.
Ali_2101