Beginners - September 2011 (Page 38)

Newbie: Help with webservice request
 
Hi, I have very little programming skills and I'm willing to create my first first service request. The Webservice method I'm trying to invoke is as foll...
[no replies]
Define a global 'set' variable
 
Hi All, I am trying to define a global 'set' object to use it throughout my code. Here is the example: In my main.h include file: struct StudentStruct { ...
[2 replies] Last: That error means you probably forgot to #include <set> or that you n... (by shacktar)
problem with bool -- can't exit loop
 
In the following program I want the program to stop iterating loop when the user chooses choice 6 (line 52). If the user chooses choice 6 then the bool variable...
[2 replies] Last: Or you could use break to stop the loop. Instead more=false; write ... (by CosminNTG)
Identifying numbers in arrays.
 
I have created a program which takes in the user input for a couple of things and sorts them out in an array. The problem is, I would like to print the highest ...
[1 reply] : I don't really know what you want to do in this program. This program... (by CosminNTG)
Problems with char and LPCSTR
 
I have made a program that randomly generates a street name. it worked fine as a console application. Now that I have learn't a bit about it I thought I would t...
[4 replies] Last: Thank you very much! (by closed account 2NywAqkS)
how to get lenght of number
 
how to get length of a number. like if i input number 1032 (integer type data) how to know that it's a 4 digit number.
[5 replies] Last: @time to c: Did you execute the mussaAli's program? You enter a number... (by CosminNTG)
Quick question about using float...
 
In my intro C++ class we were assigned to write this simple function program that states the weather and gives you the averages for each day and the week. ...
[3 replies] Last: If the input values (temperatures) are supposed to be of type int an... (by Danielsson)
by eypros
Problem in Template function. Uncomprehensive error message
 
Hello again, I was testing a code from Accelerated C++ and (as usual) came up with some errors. The fact is I don't get what to correct in this peace of co...
[2 replies] Last: No I use also header files (I didn't mention) as well as space.cpp and... (by eypros)
by gibran
checking for EOF, reading input
 
Hey everyone i am having a problem with reading input from a text file that looks like this: 9 1 1 1.2 -2.3 0.4 -2 -3 -4 +0 -2 8.85 2.345 The problem is that ...
[4 replies] Last: ¿then why the last line just got 1 number? ¿do you want "default" va... (by ne555)
Question about pancakes.
 
So I was doing one of the beginner exercises from this website, which is called Pancake Glutton or something. I've done the most, I just can't figure out how to...
[3 replies] Last: #include <iostream> #include <vector> #include <conio.h> #include <... (by mussaAli)
The k-th smallest element of a set.
 
I have a question about set (again :D) I want to find the k-th element of a set<int> s. I do it like this: set<int> s; int k; // sth... set<int>::iterator it...
[2 replies] Last: A binary tree is sorted by some key. Since the data is integers, the ... (by webJose)
Stop the countdown
 
I got this program that counts down from a number (specified by the user) to zero, while pausing in between each number for 2 seconds. How would I be able to te...
[2 replies] Last: You could create two threads; one listens to the keyboard whilst the o... (by Moschops)
switch function error
 
Hi!I have a problem with the switch-case format.After using this function i have reveived this error a couple of times: error C2143: syntax error : missing ':...
[9 replies] Last: #define CERC 1 #define PATRAT 2 #define DREPTUNGHI 3 #define TRIUNG... (by crawler)
#warning deprecated or antiquated header
 
I am working on a program that has 3 header files that were provided by the instructor. If I am reading the information on my compiler (Dev-C++) correctly, the...
[3 replies] Last: FYI, when I recommended switching to sstream, I never said it was a DI... (by webJose)
by Frypot
How to disallow characters
 
Hi, i have received a task for extended study to write a program in C++ that will allow you to enter 5 single digit numbers. So far the program to ONLY allow ...
[4 replies] Last: You changed the topic subject, right? I don't remember it was about di... (by Catfish)
Alternative to #define
 
Hi everyone, In the program I am writing I need to include a time stamp which need to be in the form: "time: 2011-09-08 14:21:44.4730". I have achieved this b...
[3 replies] Last: Encase anybody is interested here's what the function looks like: vo... (by drunken meerkat)
Selection without decision branching
 
In a basic c++ class, and our assignment is the write a program that does some calculations, then decides based on the results which item to choose. I'd have i...
[9 replies] Last: Change what to true or false? c would be replaced with "mass < 90" or ... (by hamsterman)
by efigen
passing filename values to classes
 
Is there any way that you can pass values from your int main function, say content in a file, to a class outside the function? I tried doing something like thi...
[1 reply] : Functions can have parameters, for example: void function(int paramet... (by Catfish)
How do you keep motivated when times get tuff?
 
I've done some beginner level programming in BASIC and Python. Just a week ago I decided to try C++. I bought the book "C++ All-In-One Desk Reference For Dum...
[8 replies] Last: Thank you all for your replies. I decided to skip that part of the bo... (by carebearboy)
braces program (logic)
 
Hi Everyone I am writing a code to check if the braces are balanced, but I am confused on how to eliminate: 1. // {} inside a comment 2. /* {} inside block ...
[9 replies] Last: Don't forget: // This \ is a comment {} "This \ is a string {}" ED... (by helios)
September 2011 Pages: 1... 3637383940... 48
  Archived months: [aug2011] [oct2011]

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