Beginners - September 2015 (Page 26)

Finding Mid Value
 
My is assignemnt is as follows... The program has an expression statement to initialize x, y and z. It has another statement to make the variable the actual mi...
[1 reply] : So, why don't use simple mathematics. You also have to notice, that, i... (by MokkaTech)
I need help identifying what's wrong with my code?
 
I have no idea what is wrong with my code? #include <iostream> using namespace std; //Function Declarations float getLoanPayment(); float getInsuranc...
[5 replies] Last: @Frankie1210 The reason why it's not displaying the added value is bec... (by SideEffects)
Count the frequency
 
hello guys, could u pls help me with my frequency function? I was making a function to count the frequency of those elements inside the vector. But i think som...
[7 replies] Last: I think all i need to change is that after the for loop i have cout th... (by garyfang)
Turn if statements into functions
 
The code ask the user to choose a shape to draw, how would I turn the if statements into functions. By doing this can I then prompt the user to choose how many ...
[1 reply] : You can take all the code in main, put it in a function and most of th... (by SamuelAdams)
Binary_data
 
Hi everyone, I would like to open a binary data file, read and print the information using c/c++. In Matlab I can use fread to read the file, but I am not ...
[2 replies] Last: Thank you very much for your help it works, but I was wondering if the... (by Lalageh)
by doons
2D array
 
The university election will start in few days … they decided to create a system that calculates the total number of votes and decide who won the election ins...
[8 replies] Last: yes it works thanku (by doons)
Help?
 
Could someone explain the third page of the tutorials (Variables and types) to me as if I was an idiot
[5 replies] Last: Thank you everybody!!! :} (by Grayden)
Size of string
 
Please have a look to below code: char* str = "akash"; string st = "akash"; cout<<"Size of char* : "<<sizeof(str)<<endl; // 4 ...
[6 replies] Last: Mark as Solved please bro.. (by Swapnil2000)
Need help Beginner here please help
 
.
[2 replies] Last: . (by akanash94)
Adding values from functions??
 
I need help adding up all the values that are inputted and returned by all the functions?? #include <iostream> using namespace std; //Function Declara...
[2 replies] Last: Frankie1210, This is why you shouldn't post multiple times, you see ... (by TheIdeasMan)
Corresponding symbols comparison?
 
For example, if you store char of symbols "( {" into a stack, how would you make a comparison to say that the correct corresponding symbols are the closing "} )...
[2 replies] Last: If you have two variables c1 and c2 that contains the symbols that... (by Peter87)
by asmi54
collision of same values in priority queue?
 
In case of two same values in the priority queue, how to make one particular value go on top as opposed to other? This is when the elements in the prio queue ar...
[2 replies] Last: Okay. I did this. And it worked!! bool operator<(const node& othe... (by asmi54)
About a simple question..
 
Ask the user for the defect rate, the number of items that the inspector picks, the number of shipments, and N = the number of shipments with at least one defe...
[4 replies] Last: Step 1: Clearly state the problem. Then, your program should clearly ... (by closed account 48T7M4Gy)
by Mingda
Error in constructor functions
 
This is the header file: // Tree node structure template <class T> struct TreeNode { T data; TreeNode *left, *right; }; // delete all the...
[1 reply] : Hi, Template code must go into a header file, see if that helps - I h... (by TheIdeasMan)
Really odd maths bug
 
Hello, I've just come across a strange bug in my program. Firstly, here's the code: /* Outputs the prime factorisation of a number. */ #incl...
[5 replies] Last: It would be more efficient do prime() in terms of smallestprimedivisor... (by dhayden)
Segmentation fault when printing out dynamic array
 
I'm getting a segmentation fault whenever I try to print out the line shown in the "push" function. If I remove the [d->data3] from d->data1[d->data3] and just ...
[1 reply] : d->data1[d->data3] is a char, but your printf uses %s, which expects a... (by dhayden)
The use of dots after numbers and division
 
I'm new to C++ and trying to understand someone else's code; they have a lot of dots in their code; some examples: for (x=-5.; x<=-5/30.; x+=5/30.) { ...
[4 replies] Last: Hi, When using floating point numbers ( float or double ) I always ... (by TheIdeasMan)
Need help with simple string question
 
Hi, I'm a new programmer trying to write a baseball code for my brother. I'm trying to get it so that when you enter the name of the player, their batting avera...
[4 replies] Last: Oh, yeah, using an array would be much faster. :) I didn't know how to... (by ingenia13)
Lottery program not working
 
Hello! I've been trying to get this lottery program to work for most of the day now, and i can't for the life of me figure out why nothing comes up in the cmd...
[4 replies] Last: if (similar) { --i; similar=f... (by cire)
C++ or C for app development?
 
I know this is cplusplus.com and might be an irrelevant question but I figured I'd ask anyways. I'm familiar with the basics in both C and C++ and my focus want...
[1 reply] : Well, for Windows GUIs, I guess that C# would be easier. For mobile, J... (by Kevin C)
September 2015 Pages: 1... 2425262728... 42
  Archived months: [aug2015] [oct2015]

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