|
by: Andy |
last post by:
Can someone tell me if the following Switch...Case construct is valid?
I'm wanting to check for multiple values in the Case statement without
explicitly listing each values.
So for example, will case 1-35: work? If this would work, will it
consider all numbers between 1 and 35 inclusive of 1 and 35? Please let
me know if the following will work below:
switch(state){
case 1-35:
case 37:
|
by: Guy Noir |
last post by:
Hello again. I'm assuming I'm doing something dumb here....
When I try and add a default: case to my switch statement, I get an
error that says "Error 1 Syntax error, '(' expected" and the red
squiggly is under the : after the word default. Can anyone see my silly
error? Thanks for the extra set of eyes!
-Guy
Here is the code for the entire method:
|
by: sam_cit |
last post by:
Hi Everyone,
In the following code, i have a common action for three switch cases,
is there any other better way to write the three values in a single
case?
Thanks in advance
#include <stdio.h>
|
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= |
last post by:
New programmer lost!!!
I need some help with a switch/Case statement;
I need to use OpenFileDialog to open a file,
If the file extension is .dat, then do x.
If the file extension is .rtf, then do y.
if the file extension is .txt, then do z.
|
by: Cloudbender |
last post by:
how to create a program in c that shows your zodiac sign by using switch case statement.
heres an example output:
1 - jan.
2 - feb.
3 - mar.
4 - apr.
5 - may
6 - jun.
7 - jul.
8 - aug.
|
|
by: gooner |
last post by:
Hey I'm new to linux, and for an assignment I have to make a switch case statement to output microprocessor workload. When the script is run it should output one of the following results:
>83 - over work load
>75 - medium work load
>50 - average workload
<50 - under working
|
by: DaemonCoder |
last post by:
I need some suggestions on how to betterer write the following code. I tried the array of arguments, and san through for a match then strcmp but i get massive errors. The code below is the only way i could get it to work.. if some one has any sugestions on hjow to make this better please let me know... The definiton of the class was left out intentionally. if you need this please let me know
int EXIT=1;
int main()
{
System system...
|
by: Satya |
last post by:
Hi everyone,
This is the first time iam posting excuse me if iam making any
mistake. My question is iam using a switch case statement in which i
have around 100 case statements to compare. so just curious to find
out is it effective to use this method?? or is there is any other
alternative method present so that execution time and code size can be
reduced??
Thanks in advance.
|
by: HaLo2FrEeEk |
last post by:
I'm trying to make a switch statement that will handle hotkeys assigned to different functions in my application. The hotkeys will be user-changable, so I've got them saved as application settings. I have a class that allows the program to hook the keyboard and accept the hotkeys even if the program doesn't have focus. In the event handler for that hook I'm trying to create a switch statement that looks like this:
switch (e.KeyCode)
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|