Forum: C Jun 15th, 2009 |
| Replies: 6 Views: 277 Hello.,
I'm reading about anonymus structs and have problems understanding what is the privilege to have one. could anyone demonstrate an example of both anonymus and regular struct. I see that... |
Forum: C Jun 11th, 2009 |
| Replies: 6 Views: 362 Hello.,
Have a question about array being set from function argument. I wrote this little program, and want to know why cant i set an array size from the function argument. Any help would be greatly... |
Forum: C Jun 6th, 2009 |
| Replies: 3 Views: 292 Hello.,
I'm very green in c++, and at school we just had a first lesson on pointers to functions, and I'm going over teachers code using debugger and dont understrand why the line age =... |
Forum: C++ May 24th, 2009 |
| Replies: 9 Views: 301 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: 301 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: 173 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: 589 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: 167 #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: 290 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: 290 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: 290 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); |
Forum: C Jan 24th, 2009 |
| Replies: 8 Views: 653 thank you guys so much!!! |
Forum: C Jan 18th, 2009 |
| Replies: 8 Views: 653 depends on the pass if its the first pass then 0, if second then 1, e.c.t... |
Forum: C Jan 18th, 2009 |
| Replies: 8 Views: 653 #include<stdio.h>
#define COUNT 5
void enter(int *p_arr);
void report(int arr[], int count);
int main()
{ |
Forum: C Dec 6th, 2008 |
| Replies: 9 Views: 623 could anybody please help imbeding fgets() to read 1 letter from stdin? do i have to create array for this? do i have to include a pointer to char in fgets() argument? once its read i have to extract... |
Forum: C Dec 6th, 2008 |
| Replies: 9 Views: 623 wow thats awesome i still dont understand why does it skip to the next line, im reall new, but how to extract from fgets buffer into memory?
thanx alot! |
Forum: C Dec 6th, 2008 |
| Replies: 9 Views: 623 Hello guys, I'm trying to collect user input which combines integers with letters, but whenever it reaches the scanf for char it skips it and goes to next integer, could anybody explain why??? is it... |
Forum: C Nov 28th, 2008 |
| Replies: 1 Views: 289 hello.,
im trying to create a validation block that checks if the number is multiple of 5. im new at c, could anyone give me a tip? thanx a lot!
cheers! |
Forum: C Nov 26th, 2008 |
| Replies: 25 Views: 1,733 |
Forum: C Nov 26th, 2008 |
| Replies: 1 Views: 638 Hey guys!
Could anyone enlighten me how to draw a graphic window in c? which classes to use and maybe a basic example would be greatly appreciated. cheers!!
im using XCode and i assume it doesnt... |
Forum: C Nov 26th, 2008 |
| Replies: 2 Views: 284 hello.,
in a few examples i noticed that pointers are declared in functions parameter list.
ex
#include <stdio.h>
void SwapEm (char *p_grade1, char *p_grade2);
int main () |
Forum: C Nov 25th, 2008 |
| Replies: 1 Views: 246 hello.,
ny1 knows what is the data type for displaying hex numbers? i know that specifier is %x, but dont know what data type it is
ex: 0xBCD
thanx! |
Forum: C Nov 16th, 2008 |
| Replies: 2 Views: 350 Hey guys,
Im reading up on pointers and since i dont have a physical teacher, Its abit hard concept to grasp. Could anyone please explain in their own words shortly how they work, I understand that... |
Forum: C Nov 11th, 2008 |
| Replies: 5 Views: 827 Hey guys,
Im learning C online, and its hard somtimes to understand the concepts, w/o being in class asking questions. I was wondering hat would be the easiest and fstest way to understand numeric... |
Forum: C Nov 10th, 2008 |
| Replies: 1 Views: 330 Hey guys., i wrote a little program to calculate the foreign exchange of canadian dollar to french frank. but when i validate an input(it has to be between 1 and a 1000), i get a problem even though... |
Forum: C Nov 9th, 2008 |
| Replies: 2 Views: 455 Hello.,
Im learning C online, and one of the examples from the internet is this:
#include <stdio.h>
int CalcVolume (int length, int width, int height);
void PrintIt (int vol); |
Forum: C Nov 6th, 2008 |
| Replies: 1 Views: 300 Hey Guys.,
Im super desparate have 1 day to hand this in. Have to use loops only.
quote:
The use of any of the following C statements or functions is not permitted under any circumstances.
... |
Forum: C Nov 4th, 2008 |
| Replies: 4 Views: 507 |
Forum: C Nov 3rd, 2008 |
| Replies: 4 Views: 507 Hey Guys!
I have a weired one here, it must be a post-test loop, and here is how result has to look like:
Enter the Section Code: 0
Invalid value entered. Must be 1 to 4, please re-enter:... |
Forum: C Nov 2nd, 2008 |
| Replies: 2 Views: 368 Hello.,
I haveto check for non-numerci input, when reading numeric input. I know how to validate numeric input with while loop, but what if i need numeric input and user inputs alphabetic letter,... |
Forum: C Nov 2nd, 2008 |
| Replies: 7 Views: 876 It works great, but im trying to understand the logic behind it,once we start the loop, i=0, and then in the first pass in the condition it adds 1 to it so i=1, then after printf it adds again?... |
Forum: C Nov 2nd, 2008 |
| Replies: 7 Views: 876 thanx a lot it sais 8, but when i try to set it <= 7 its still 8.,
any suggestions? |
Forum: C Nov 2nd, 2008 |
| Replies: 7 Views: 876 Thanx a lot for a tip, i changed everything to double except i, cuz if i change i to double the "Enter Mark#0" occurs on every entry, but still the result is abit incorrect, it came closer though,... |
Forum: C Nov 2nd, 2008 |
| Replies: 7 Views: 876 Hey guys!
I'm trying to calculate the average for student marks using pretest loop, and for some reason i get the wrong result, even though the code looks proper to me.,
there are 7 questions all... |
Forum: C Nov 1st, 2008 |
| Replies: 4 Views: 564 |
Forum: C Nov 1st, 2008 |
| Replies: 4 Views: 564 Hello again guys!
i have a simple question how to promt user to enter a number for example 444 or whatever and for c to print it as a 9 digit number, so if its 444 c would print it as 000000444?
... |
Forum: C Oct 28th, 2008 |
| Replies: 22 Views: 1,761 wow
its killer!!!
works great., thanx alot! thank you ))
i didnt know you can put statements inside conditions, its great! |
Forum: C Oct 28th, 2008 |
| Replies: 22 Views: 1,761 im trying for over 3 hours to understand and inbed what you suggesting, but get errors during compilation, i'm very new to c, and dont fully understand the terminology yet, do you mean to put &&... |
Forum: C Oct 28th, 2008 |
| Replies: 22 Views: 1,761 tried that., if i do that the do/while loop stil executes at least once with a second Invalid Input request. :((( |
Forum: C Oct 27th, 2008 |
| Replies: 22 Views: 1,761 sorry has to be post-test loop |