Beginners - March 2009 (Page 10)

Put int value into char array
 
Hello everyone!I'm a beginner in C programming. I'd like to ask if there is any way that I can use a char array to simulate a int variable. As I knew char use 1...
[2 replies] Last: The char type holds a byte of information, it's true. What this means... (by psault)
by oz2391
need assitance with my C++
 
Hi all, i'm new at C++, and just doing a beginners course on it at college. I've got this assignment for this week, and got stuck... The question is: T...
[3 replies] Last: Asuming you always want your length to be a larger size than your widt... (by psault)
by jaydr
header files and file declarations
 
i have a program that has a user made header file and a main file. the program works Question is can i make a separate file with just the file definitions and i...
[8 replies] Last: Thank you for all your help. (by jaydr)
by bul268
Program goes into loop.
 
I have written the following program which goes into a loop and does not come out of it.Can anyone guide me on this? [ #include <cstdlib> #include <iostream>...
[15 replies] Last: if(Category=01) /* Never use this = mark to in a condition,, this is n... (by bacardi)
counting blankspaces from a string
 
ive been doing a intro to c++ in college. i am required to count number of non blank charactersfrom a string. I know i have to subtract the number of spaces f...
[8 replies] Last: ok thanks guys. I figured it out and the program seems to be running f... (by cygwinrocks88)
how to dynamic array?
 
main() { int *x; int n, i; cin>>n; for(i = 0; i< n; i++) cin>>a ; int k = func(a, n); /* add k to the a */ } to add k value from function to ...
[4 replies] Last: my problem is can't goto the func(x, n) array with new element main(... (by gantsooj)
Overloading >> as a Friend in a Linked List
 
I'm trying to read a list of integers from a file into a linked list using nodes. I want to overload the >> operator as a friend function to read the data. I ...
[1 reply] : I think it means that the variable data has not been declared and read... (by kenshin)
what is wrong with my program.
 
hi guys, ive written this program to count: nonblank characters,number of lines, length of longest line and number of times longest line occurs.. from a sentenc...
[3 replies] Last: hey i figured it out. its working fine. thanks for your help. (by cygwinrocks88)
terminating a while loop with a char
 
I can't seem to terminate this program with char 'q'. I have no problems with the program being modified to terminate by an int. As it is now, the program wil...
[6 replies] Last: I have read a lot about using string to handle this problem, but I wo... (by Bazzy)
What does these lines means?
 
int main(int nNumberofArgs, char* pszArgs ) int main(int argc, char *argv ) for(;;) int anything( void ) I'm really sorry if this has been posted ...
[3 replies] Last: int anything(void) That is the C-version of int anything() ... (by eker676)
by bul268
Code is not giving correct output?
 
Hi, I am trying to get a highest number from a list of 70 numbers.I have written the following code which is not giving a correct output. Can anyone pls guide ...
[14 replies] Last: if you have std::cout and nonstd::cout by using namespace std yo... (by Bazzy)
Illegal else without matching if
 
Hi I'm new to c++ and I'm trying to write a program for class that is to figure out the different salaries between employees and I'm getting an error for illega...
[3 replies] Last: Thanks guys for the help. I understand what I was missing. Everything ... (by soccer629)
by tke301
Keep on get memory adress in program
 
I have to write a program that takes rainfall statistics for 12 months then displays the months in descending order based of the inputted rainfall. I have writt...
[1 reply] : Those values are not memory addresses. They are just uninitilased ran... (by guestgulkan)
by cdummy
command prompt problem
 
Hi I am in a very beginning of C. I write and save the 'Hello World' program then follow the instruction to compile and run it. But every time with different e...
[3 replies] Last: You should download the Microsoft Visual C++ Express IDE its a very po... (by kenshin)
Expected primary-expression before "else"
 
Where is this primary-expression meant to be exactly? :S for(;;) { cout << "What is your current salary: " << pound; g...
[2 replies] Last: :) Thank you (by mcleano)
add element to the array?
 
how to add the element from function to the 1d array in main and need increase to array size too?
[1 reply] : Arrays cannot be resized. If you need to do something like that, there... (by helios)
to return 2 arguments to main?
 
how ro return 2 values x and y from function to main? then to add these values to the a , and a . it means to add x and y from function to the array
[4 replies] Last: thanks all ur replies (by gantsooj)
When we will create Object Dynamically in C++?
 
Hi, Can you please tell me in what type of situations we will create Object Dynamically and statically in C++? Thanks in advance Siva
[2 replies] Last: Example: Array of structures or classes of an indeterminable length be... (by eker676)
unexpected results using file io
 
I have code similar to the following: #include <iostream> #include<windows.h> #include<fstream> #include<iomanip> #include "kbd_stuff.h" using namespac...
[4 replies] Last: myfile.setstate(std::ios::goodbit); (by kypeswith)
Pointer Mayhem
 
/* Encode and decode a string using bitwise rotation by a value (number of places) derived from a string key. */ #include <iostream> using namespace s...
[2 replies] Last: You are absolutely correct. And that is one of my pet peeves about C+... (by jsmith)
March 2009 Pages: 1... 89101112... 29
  Archived months: [feb2009] [apr2009]

This is an archived page. To post a new message, go to the current page.