Forum: C++ May 24th, 2009 |
| Replies: 9 Views: 322 sorry was in a rush and forgot to ask., The question is how to rewrite the function w/o using if statement.
Any help would be appreciated |
Forum: C++ May 23rd, 2009 |
| Replies: 9 Views: 322 Hello.,
I'm very new in C++, and I have a task to solve.
I have a function:
void cio_display(const char *str, int row, int col, int len){
int i;
cio_move(row, col);
if(len<=0) {
... |
Forum: C++ May 23rd, 2009 |
| Replies: 2 Views: 180 Hello!
I'm new in C++, and I have a basic question:
When I have a function:
void foo(str* s){
char* p;
p = new char[strlen(s)];
strcpy(p, s); |
Forum: C++ Feb 21st, 2009 |
| Replies: 6 Views: 635 Hello guys,
I'm very green in c++ and just started to understand classes and objects. I'm reading on the web about this pointer, but having difficulties understanding how it works exactly, could... |
Forum: C++ Feb 10th, 2009 |
| Replies: 1 Views: 173 #include<stdio.h>
class q1 {
int id;
public:
q1() { id = 1; printf("mkdef: %d\n", id); }
q1(int start) { id = start + 1;
printf("mknew: %d\n", id); }
~q1() { printf("rm: %d\n", id); } |
Forum: C++ Jan 24th, 2009 |
| Replies: 5 Views: 319 Thank you so much for fast and detailed responce., so after statement p=a+i, does it mean that p equals 2 in the first pass? and does it mean that with statement x=*p means that x=2? i'm abit... |
Forum: C++ Jan 24th, 2009 |
| Replies: 5 Views: 319 when in the function p=a+i; does it mean p=0+0? since a points to the 1st element which is a 0 and i is also 0 in a first pass of the loop??? or it would be a=0 + 2(since its the first element's... |
Forum: C++ Jan 24th, 2009 |
| Replies: 5 Views: 319 Hello.,
Im very new to C++ but im trying to resolve a fragment of the following code:
#include <iostream>
using namespace std;
const int NO_STEPS = 4;
void s(int* a, int i); |